tsengeagle / devop-bbuddy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Quality Gate Issues

Overall Coverage UT Coverage Function Complexity Class Complexity Duplications Code Smells

This is the repo for the exercise project to be developed in Shanghai team's Modern Web Development course

Installation

Please install the following tools for this project. The latest version should be fine unless specific version is listed.

  • git
  • jdk 1.8
  • mysql
  • Intellij (please choose either community or ultimate edition)
    • Intellij idea community edition with the following plug-in installed
      • lombok plug-in
      • cucumber java plug-in
    • Intellij idea ultimate edition (evaluation) with the following plug-in installed
      • lombok plug-in
  • Firefox 46.0 (don't use higher version)
  • gulp 3.9.1

Setup Command Line Development Environment

Use git to clone this project into a folder. Then in this folder, run the command below in order.

  • Create a default mysql dba user mysql -u root -p < src/main/sql/create_default_dba.sql
  • Init Intellij environment ./gradlew idea
  • Start Web Application ./gradlew run (on port 8090)
  • Run All Tests ./gradlew ci (on port 8080)
  • if you want to start it on a port rather than 8090 (e.g. 8070), please do ./gradlew run -Pport=8070

Setup Intellij Development Environment

  • Start Web Application
    • Intellij idea community edition
      • Run com.odde.bbuddy.Application as a Java application by setting environment variable "SPRING_PROFILES_ACTIVE" to "dev"
    • Intellij idea ultimate edition
      • Run com.odde.bbuddy.Application as a Spring Boot application by setting environment variable "SPRING_PROFILES_ACTIVE" to "dev"
  • Run Unit Tests. Run those unit tests as normal. The only limitation is that you can't run those "Nested" tests together with other non "Nested" tests
  • Run Acceptance Tests (cucumber). In feature file, you can select the feature or one scenario and then run it. In the configuration, you need to set environment variable "SPRING_PROFILES_ACTIVE" to "test"
  • Spring Boot Developer Tools is used so that you can hot load any modified code, template file and resource file without restart the application. Please follow the steps below to enable this hot load feature.
    • Start the application in Intellij as described in the first item. Don't start it with gradle in command line.
    • Edit any code or file, and make the project. Then, the change will be reloaded automatically.
    • You can install a Chrome extension called Live Reload so that the tab (in which this application is opened) will be refreshed automatically.

Setup Development Environment using VM

Install the following tools first.

Then run the command: vagrant up

If you are using MacOS, and have Homebrew installed.

Run the below commands:

brew cask install virtualbox vagrant
brew install ansible
vagrant up

About


Languages

Language:Java 79.3%Language:JavaScript 9.0%Language:HTML 5.5%Language:CSS 3.1%Language:Gherkin 2.1%Language:Shell 1.0%