diff --git a/Jenkinsfile b/Jenkinsfile index 805d328ebe3636232ec5ef09233b6e79e5fb276c..6c0224af935dfd368f5dc5340623b7ab37a483b6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -100,20 +100,20 @@ pipeline { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { sh 'mvn --version' sh 'mvn -s $MAVEN_SETTINGS -pl -goofy-client clean install spring-boot:build-image -Dmaven.wagon.http.retryHandler.count=3' - } - - script { - try { - if (env.BRANCH_NAME == 'master') { - dir('goofy-server'){ - withSonarQubeEnv('sonarqube-ozg-sh'){ - sh 'mvn sonar:sonar' - } - } - } - } catch (Exception e) { - unstable("SonarQube failed") - } + + script { + try { + if (env.BRANCH_NAME == 'master') { + dir('goofy-server'){ + withSonarQubeEnv('sonarqube-ozg-sh'){ + sh 'mvn -s $MAVEN_SETTINGS sonar:sonar' + } + } + } + } catch (Exception e) { + unstable("SonarQube failed") + } + } } } }