Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix how URL is detected for a PR #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

oz123
Copy link

@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.

None yet

3 participants