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.

  1. ghprbactualcommit

  2. ghprbactualcommitauthor

  3. ghprbactualcommitauthoremail

  4. ghprbpulldescription

  5. ghprbpullid

  6. ghprbpulllink

  7. ghprbpulltitle

  8. ghprbsourcebranch

  9. ghprbtargetbranch

  10. sha1

you'll want use $ghprbsourcebranch value of branch being built somewhere else in script.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -