How to clone a git repo with a different branch than master on Jenkinsfile
29 views
Skip to first unread message
Mario Rodriguez
unread,
Oct 26, 2016, 7:50:56 PM10/26/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Users
Hi, I have a very simple Jenkinsfile pipeline that uses "checkout scm" but I'm looking for a way to specify this command to use a different branch than master.
any ideas ?
thanks
Sverre Moe
unread,
Oct 27, 2016, 3:18:40 AM10/27/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Users
Snippet generator => checkout: General SCM
Sverre Moe
unread,
Oct 27, 2016, 3:34:28 AM10/27/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Users
One more thing:
You do not need to set all parameters on the new checkout.
Get common parameters through the available scm variable.