Azure DevOps Pipeline - SonarQube Integration
ฝัง
- เผยแพร่เมื่อ 3 ธ.ค. 2023
- Integrating Azure Pipeline with SonarQube for static analysis of a Maven based Java code base.
Source Code Referenced in this demo : github.com/rchidana/mvndemo - วิทยาศาสตร์และเทคโนโลยี
Pipeline Code:
--------------------------------------------------------------------------------------------------------------------------------------------------
# Maven
# Build your Java project and run tests with Apache Maven.
# Add steps that analyze code, save build artifacts, deploy, and more:
# docs.microsoft.com/azure/devops/pipelines/languages/java
trigger:
- master
pool:
vmImage: ubuntu-latest
steps:
- task: SonarQubePrepare@5
inputs:
SonarQube: 'My-Sonar-Server'
scannerMode: 'Other'
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
goals: 'clean install sonar:sonar'
--------------------------------------------------------------------------------------------------------------------------------------------------