Skip to content

Commit

Permalink
Fixed scan to depend on build_and_test, moved xml report to scan
Browse files Browse the repository at this point in the history
  • Loading branch information
karicordes committed Mar 12, 2024
1 parent 81718ea commit 5bcce0f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ jobs:
docker stop mms
mkdir -p jacocoOutput
docker cp mms:/mms/jacocoOutput/jacoco-it.exec ./jacocoOutput/jacoco-it.exec
cp -r ./*/build/classes/* TEMPORARYclassfiles/
java -jar jacocoJars/jacococli.jar report jacocoOutput/jacoco-it.exec --classfiles TEMPORARYclassfiles/ --xml ./jacocoOutput/jacocoXMLReport
rm -r TEMPORARYclassfiles
- persist_to_workspace:
root: /home/circleci/
paths:
Expand All @@ -67,7 +63,12 @@ jobs:
- checkout
- run:
name: Build classes to scan
command: ./gradlew build -x test
command: |
./gradlew build -x test
cp -r */build/classes/java/main/* TEMPORARYclassfiles/
java -jar jacocoJars/jacococli.jar report jacocoOutput/jacoco-it.exec --classfiles TEMPORARYclassfiles/ --xml ./jacocoOutput/jacocoXMLReport
rm -r TEMPORARYclassfiles
- sonarcloud/scan

deploy_snapshot:
Expand Down Expand Up @@ -98,6 +99,8 @@ workflows:
tags:
only: /[0-9.]+(-(a|b|rc)[0-9]+)?/
- scan:
requires:
- build_and_test
filters:
tags:
only: /[0-9.]+(-(a|b|rc)[0-9]+)?/
Expand Down
1 change: 1 addition & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ sonar.projectKey=Open-MBEE_exec-mms
sonar.organization=openmbee
sonar.language=java
sonar.java.binaries=**/build/classes/java/main
sonar.coverage.jacoco.xmlReportPaths=jacocoOutput/jacocoXMLReport

0 comments on commit 5bcce0f

Please sign in to comment.