From 2b6c1520d73d47dcb0d3c108c0853e081996d02d Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Thu, 21 Sep 2023 00:34:50 +0200 Subject: [PATCH] fix sonar qube for server --- Jenkinsfile | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9bb5c357a9..4cc805490d 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") } } -- GitLab