Skip to content

Commit

Permalink
Bring back sonar build to jenkins file
Browse files Browse the repository at this point in the history
  • Loading branch information
azoitl committed Dec 13, 2023
1 parent ac03e35 commit 16c6e53
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@ pipeline {

stage('Build') {
steps {
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
sh '''
export GDK_BACKEND=x11
mvn clean verify -Dmaven.repo.local=$WORKSPACE/.m2/repository \
-DapiBaselineTargetDirectory=${WORKSPACE} \
-Dgpg.passphrase="${KEYRING_PASSPHRASE}" \
-Dproject.build.sourceEncoding=UTF-8 \
-Peclipse-sign
'''
withCredentials([string(credentialsId: 'sonarcloud-token', variable: 'SONARCLOUD_TOKEN')]) {
withSonarQubeEnv(credentialsId: 'sonarcloud-token', installationName: 'GEF_Classic_SonarQube.io') {
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
sh '''
export GDK_BACKEND=x11
mvn clean verify -Dmaven.repo.local=$WORKSPACE/.m2/repository \
-DapiBaselineTargetDirectory=${WORKSPACE} \
-Dgpg.passphrase="${KEYRING_PASSPHRASE}" \
-Dproject.build.sourceEncoding=UTF-8 \
-Peclipse-sign \
-B sonar:sonar -Dsonar.projectKey=gef-classic -Dsonar.organization=eclipse -Dsonar.host.url=${SONAR_HOST_URL} -Dsonar.login=${SONARCLOUD_TOKEN}
'''
}
}
}
}
post {
Expand Down

0 comments on commit 16c6e53

Please sign in to comment.