diff --git a/Jenkinsfile b/Jenkinsfile index 9bb5c357a99b1682b45602c5849f3c3416fb054d..4cc805490dfb8573ac3c482909a08269dbe31cdb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -85,6 +85,9 @@ pipeline { // } } stage('Server') { + when { + branch 'master' + } steps { script { FAILED_STAGE=env.STAGE_NAME @@ -94,15 +97,19 @@ pipeline { sh 'mvn --version' sh "mvn -s $MAVEN_SETTINGS -pl -goofy-client clean install spring-boot:build-image -Dspring-boot.build-image.imageName=docker.ozg-sh.de/goofy:${IMAGE_TAG} -Dspring-boot.build-image.publish -Dmaven.wagon.http.retryHandler.count=3" - try { - if (isMasterBranch()) { - dir('goofy-server'){ - withSonarQubeEnv('sonarqube-ozg-sh'){ - sh 'mvn -s $MAVEN_SETTINGS sonar:sonar' - } + try { + dir('alfa-service'){ + withSonarQubeEnv('sonarqube-ozg-sh'){ + sh 'mvn -s $MAVEN_SETTINGS sonar:sonar' } - } - } catch (Exception e) { + } + dir('alfa-xdomea'){ + withSonarQubeEnv('sonarqube-ozg-sh'){ + sh 'mvn -s $MAVEN_SETTINGS sonar:sonar' + } + } + } + catch (Exception e) { unstable("SonarQube failed") } }