Skip to content

Commit

Permalink
only run sonar on PR
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Berezovskyi <andriib@kth.se>
  • Loading branch information
berezovskyi committed Feb 16, 2022
1 parent 2368521 commit 681e207
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@ pipeline {
stage('Debug') {
steps {
script {
echo 'to be removed'
// echo 'Working on' + env.BRANCH_NAME
// echo '... or A' + env.BRANCH_NAME_A
// echo '... or B' + env.BRANCH_NAME_B
echo 'GIT_BRANCH' + env.GIT_BRANCH
echo 'BRANCH_NAME' + env.BRANCH_NAME
echo 'CHANGE_ID' + env.CHANGE_ID
echo 'CHANGE_BRANCH' + env.CHANGE_BRANCH
// echo 'GIT_BRANCH ' + env.GIT_BRANCH
// echo 'BRANCH_NAME ' + env.BRANCH_NAME
// echo 'CHANGE_ID ' + env.CHANGE_ID
// echo 'CHANGE_BRANCH ' + env.CHANGE_BRANCH
}
}
}
stage('Sonar') {
stage('PR check') {
when {
changeRequest()
}
steps {
// def urlcomponents = env.CHANGE_URL.split("/")
// def org = urlcomponents[3]
// def repo = urlcomponents[4]
withCredentials([string(credentialsId: 'sonarcloud-token', variable: 'SONARCLOUD_TOKEN')]) {
withSonarQubeEnv('SonarCloud.io') {
sh '''
Expand Down

0 comments on commit 681e207

Please sign in to comment.