Skip to content

Fix how URL is detected for a PR#43

Open
oz123 wants to merge 1 commit into
jenkinsci:masterfrom
oz123:master
Open

Fix how URL is detected for a PR#43
oz123 wants to merge 1 commit into
jenkinsci:masterfrom
oz123:master

Conversation

@oz123
Copy link
Copy Markdown

@oz123 oz123 commented Sep 29, 2017

This mostly boils down to removing PULL/ID from USER/REPO/PULL/ID.

All the other changes are debugging messages so it's easier to follow
the logic.

This a possible fix for #39 and #42

My pipeline now contains the following statements:



...
currentBuild.result = 'SUCCESS'
                  try {
                      echo "In PR"
                      step([$class: 'CompareCoverageAction', scmVars: [GIT_URL: "https://github.com/mobilityhouse/testci",])
                  } catch (error) {
                    echo "Not in PR"
                    echo error.getMessage()
                  }



 post {
        success {
           script {
              if (env.BRANCH_NAME == 'master') {
              step([$class: 'MasterCoverageAction',
                  scmVars:
                    [GIT_URL: "https://github.com/mobilityhouse/testci",]
                   ])
              echo 'hura!'
              }
           }
        }


 This mostly boils down to removing PULL/ID from USER/REPO/PULL/ID.

 All the other changes are debugging messages so it's easier to follow
 the logic.

 This a possible fix for jenkinsci#39 and jenkinsci#42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants