Skip to content

Commit

Permalink
Added SonarCloud stage in travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Cook committed Nov 20, 2017
1 parent bb67c8e commit 73eee80
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
# - stage: publish artifact
# script: mvn -s .travis.settings.xml deploy
# skip_cleanup: true
- stage: sonar scan
script: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=boycook-github -Dsonar.login=$SONAR_LOGIN
- stage: deploy to test
script: mvn package
deploy:
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A simple movie catalogue service used for developer training
* Test: http://movie-service-test.eu-west-2.elasticbeanstalk.com
* Prod: http://movie-service.eu-west-2.elasticbeanstalk.com

### Commands
### Commands

Tests

Expand All @@ -19,18 +19,18 @@ Tests
Coverage

mvn clean cobertura:cobertura

Publish artifact

mvn -s .travis.settings.xml clean deploy

Create DB

mysql -u root < scripts/create_db.sql
mysql -u root < scripts/create_db.sql

Remove DB

mysql -u root < scripts/delete_db.sql
mysql -u root < scripts/delete_db.sql

Running Spring Boot

Expand All @@ -40,6 +40,13 @@ Build and run

mvn clean package && java -jar target/movie-service.jar --server.port=5000

Sonar Cloud

mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.organization=boycook_github \
-Dsonar.login=$SONAR_LOGIN

Sync repo with code.red

git remote add upstream ssh://git@git.code.red:7999/cr/poc-pipeline-movie-service.git
Expand Down

0 comments on commit 73eee80

Please sign in to comment.