Skip to content

Commit

Permalink
AIRO-1561 Add Sonarqube (#118)
Browse files Browse the repository at this point in the history
* Sonarqube initial commit

* Change branch trigger

* Fix typo

* Switch unit test trigger

* Switch to prod key
  • Loading branch information
at669 authored Dec 13, 2021
1 parent 32d3c48 commit 58cd28f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .yamato/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Sonarqube Standard Scan
agent:
type: Unity::metal::macmini
image: package-ci/mac
flavor: m1.mac
variables:
SONARQUBE_PROJECT_KEY: ai-robotics-endpoint-ros
commands:
- curl https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-macosx.zip -o sonar-scanner-macosx.zip -L
- unzip sonar-scanner-macosx.zip -d ~/sonar-scanner
- ~/sonar-scanner/sonar-scanner-4.6.2.2472-macosx/bin/sonar-scanner -Dsonar.projectKey=$SONARQUBE_PROJECT_KEY -Dsonar.sources=. -Dsonar.host.url=$SONARQUBE_ENDPOINT_URL_PRD -Dsonar.login=$SONARQUBE_TOKEN_PRD
triggers:
cancel_old_ci: true
expression: |
((pull_request.target eq "main" OR pull_request.target eq "dev-ros")
AND NOT pull_request.push.changes.all match "**/*.md") OR
(push.branch eq "main" OR push.branch eq "dev-ros")
2 changes: 1 addition & 1 deletion .yamato/yamato-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ commands:
triggers:
cancel_old_ci: true
expression: |
(pull_request.target eq "main" OR push.branch eq "main" OR pull_request.target eq "dev" OR push.branch eq "dev")
(pull_request.target eq "main" OR push.branch eq "main" OR pull_request.target eq "dev-ros" OR push.branch eq "dev-ros")
AND NOT pull_request.push.changes.all match "**/*.md"
artifacts:
logs:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

### Added

Added Sonarqube Scanner

### Changed

### Deprecated
Expand Down

0 comments on commit 58cd28f

Please sign in to comment.