Merge pull request #78 from kemitix/jenkins

Jenkins SonarQube fix deployment
This commit is contained in:
Paul Campbell 2018-03-11 09:49:25 +00:00 committed by GitHub
commit 8a47177dbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,10 +36,12 @@ pipeline {
} }
} }
stage('SonarQube (develop only)') { stage('SonarQube (develop only)') {
when { expression { env.GIT_BRANCH == 'develop' } } when { expression { env.GIT_BRANCH == 'develop' && env.GIT_URL.startsWith('https://') } }
steps { steps {
withSonarQubeEnv('sonarqube') { withSonarQubeEnv('sonarqube') {
sh "${mvn} org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar" withMaven(maven: 'maven', jdk: 'JDK LTS') {
sh "${mvn} org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar"
}
} }
} }
} }