multibranch pipeline github scm context

19 views
Skip to first unread message

Arvind Jayaprakash

unread,
Mar 8, 2017, 9:55:16 AM3/8/17
to Jenkins Users
I'd like find out the following things from a multibranch pipeline script associated with a github scm provider
  • Is this build happening for a branch or a pull request?
  • If it is for a pull request, then I need to know these as well
    • Commit-id of the tip of pull request
    • Commit-id of the merge target
    • Which branch is the destination for merging the pull request?
    • Is the pull request originating from a forked repo or branch on the same repo?

Would it be possible to find all of these from the scm variable? If so how?

PS: complete documentation on what the scm variable contains would be useful
Reply all
Reply to author
Forward
0 new messages