Jenkins GitHub pull request builder - get branch name for execute shell -
i using jenkins github pull request builder plugin running unit tests when pull request made vis vis web hook. build step, need know name of branch being merged in (e.g. need develop branch if merging master branch). there way access in jenkins execute shell? thanks,
your link has answer:
environment variables
the plugin makes useful environment variables available.
ghprbactualcommit
ghprbactualcommitauthor
ghprbactualcommitauthoremail
ghprbpulldescription
ghprbpullid
ghprbpulllink
ghprbpulltitle
ghprbsourcebranch
ghprbtargetbranch
sha1
you'll want use $ghprbsourcebranch
value of branch being built somewhere else in script.
Comments
Post a Comment