v2 pipeline Deploy step only for branch master.?

25 views
Skip to first unread message

Mike Caspar

unread,
May 6, 2016, 4:15:15 PM5/6/16
to Jenkins Users

In a multi-branch scenario, are there some examples anywhere of how to make sure the deploy happens only from the master branch?

I am guessing I need to build an if statement of some sort in groovy to confirm which branch I am on?

Thanks for any help.

Mike



David Karlsen

unread,
May 7, 2016, 4:21:53 AM5/7/16
to jenkins...@googlegroups.com

You can use the variable ENV.BRANCH_NAME to determine this

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c272c631-ddb3-4f68-8f60-13c8a8ed067d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages