Skip to content
Snippets Groups Projects
Commit 16458cdf authored by OZGCloud's avatar OZGCloud
Browse files

fix Jenkinsfile Server stage

parent 92ccb5a8
No related branches found
No related tags found
No related merge requests found
......@@ -85,9 +85,6 @@ pipeline {
// }
}
stage('Server') {
when {
branch 'master'
}
steps {
script {
FAILED_STAGE=env.STAGE_NAME
......@@ -97,21 +94,23 @@ 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 {
dir('alfa-service'){
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn -s $MAVEN_SETTINGS sonar:sonar'
}
}
dir('alfa-xdomea'){
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn -s $MAVEN_SETTINGS sonar:sonar'
}
}
}
catch (Exception e) {
unstable("SonarQube failed")
}
if (isMasterBranch()) {
try {
dir('alfa-service'){
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn -s $MAVEN_SETTINGS sonar:sonar'
}
}
dir('alfa-xdomea'){
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn -s $MAVEN_SETTINGS sonar:sonar'
}
}
}
catch (Exception e) {
unstable("SonarQube failed")
}
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment