Skip to content
Snippets Groups Projects
Commit 94dc1cb5 authored by OZGCloud's avatar OZGCloud
Browse files

call of sonar qube in try-catch block to prevent build breaks

parent 3b18d3c0
No related branches found
No related tags found
No related merge requests found
......@@ -40,10 +40,14 @@ pipeline {
sh 'npm run ci-test'
if (env.BRANCH_NAME == 'master') {
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'npm run ci-sonar'
}
try {
if (env.BRANCH_NAME == 'master') {
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'npm run ci-sonar'
}
}
} catch (Exception e) {
unstable("SonarQube failed")
}
}
}
......@@ -68,13 +72,17 @@ pipeline {
}
script {
if (env.BRANCH_NAME == 'master') {
dir('goofy-server'){
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn sonar:sonar'
}
}
}
try {
if (env.BRANCH_NAME == 'master') {
dir('goofy-server'){
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn 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