Skip to content

Commit

Permalink
Merge pull request #289 from entur/sonar-in-cci
Browse files Browse the repository at this point in the history
Move sonar scanning back to circleci
  • Loading branch information
testower authored Oct 23, 2023
2 parents fa0eadc + 76f23df commit 63be9dd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
15 changes: 14 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,20 @@ aliases:
echo 'export CIRCLE_SHA1="$CIRCLE_SHA1"' >> $BASH_ENV
echo 'export CIRCLE_PROJECT_REPONAME="$CIRCLE_PROJECT_REPONAME"' >> $BASH_ENV
.circleci/trigger_build_v2.sh "entur/lamassu-deployment-config.git" "master" "$(git log -1 --pretty=%B)"
- &sonar-scan
name: Sonar scan
command: |
mvn -s .circleci/settings.xml \
org.jacoco:jacoco-maven-plugin:prepare-agent verify \
org.jacoco:jacoco-maven-plugin:report sonar:sonar \
-P prettierSkip \
-Dmaven.main.skip \
-DskipTests \
-Dsonar.projectKey=entur_${CIRCLE_PROJECT_REPONAME} \
-Dsonar.organization=${SONAR_ORG} \
-Dsonar.projectName=${CIRCLE_PROJECT_REPONAME} \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=${ENTUR_SONAR_PASSWORD}
jobs:
test:
docker:
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@ jobs:
mvn --batch-mode jacoco:prepare-agent test jacoco:report -Dprettier.nodePath=node -Dprettier.npmPath=npm
mvn --batch-mode jib:dockerBuild -Dmaven.test.skip -P prettierSkip
- name: SonarQube Scan
run: |
mvn \
org.jacoco:jacoco-maven-plugin:prepare-agent verify \
org.jacoco:jacoco-maven-plugin:report sonar:sonar \
-Dmaven.main.skip \
-DskipTests \
-Dsonar.projectKey=entur_lamassu \
-Dsonar.organization=enturas-github \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=${{ secrets.ENTUR_SONAR_PASSWORD }}
image:
# only build and push the image when it's a commit to master in Entur's repository
Expand Down

0 comments on commit 63be9dd

Please sign in to comment.