Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: P4ADEV-262 code review pipeline #3

Merged
merged 8 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 53 additions & 1 deletion .devops/code-review-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1 +1,53 @@
trigger: none # Disable CI triggers.
pr:
- dev
- uat
- main

pool:
vmImage: ubuntu-22.04

steps:
- checkout: self
displayName: Checkout
fetchDepth: 1

- task: SonarCloudPrepare@1
displayName: 'Prepare SonarCloud analysis configuration'
inputs:
SonarCloud: '$(SONARCLOUD_SERVICE_CONN)'
organization: '$(SONARCLOUD_ORG)'
scannerMode: Other
extraProperties: |
sonar.projectKey=$(SONARCLOUD_PROJECT_KEY)
sonar.projectName=$(SONARCLOUD_PROJECT_NAME)
sonar.exclusions='**/enums/**, **/model/**, **/dto/**, **/*Constant*, **/*Config.java, **/*Scheduler.java, **/*Application.java, **/src/test/**, **/Dummy*.java'

- task: Gradle@3
inputs:
workingDirectory: './'
gradleWrapperFile: './gradlew'
tasks: 'clean build jacocoTestReport'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.17'
sonarQubeRunAnalysis: false

- bash: xmlReportPaths=$(find "$(pwd)" -path '*jacoco.xml' | sed 's/.*/&/' | tr '\n' ','); echo "##vso[task.setvariable variable=xmlReportPaths]$xmlReportPaths"
displayName: finding jacoco.xml

- task: Gradle@3
inputs:
workingDirectory: './'
gradleWrapperFile: './gradlew'
tasks: "sonar"
options: '-Dsonar.coverage.jacoco.xmlReportPaths=$(xmlReportPaths) -Dorg.gradle.jvmargs=-Xmx4096M'
publishJUnitResults: false
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.17'
sonarQubeRunAnalysis: false
sqGradlePluginVersionChoice: 'build'

- task: SonarCloudPublish@1
inputs:
pollingTimeoutSec: '300'
Empty file modified gradlew
100644 → 100755
Empty file.