On Thursday, August 9, 2018 at 9:55:55 AM UTC-6, suoyua...@shopee.com wrote:
>
> Hi, I am running jenkins2 and pipeline for my job
>
> My pipeline definition is pipeline script(not pipeline script from SCM) 
> and I am using git as my scm system.
>
> I want to specify a git branch before a build starts. How can I do this?
>

If you know the list of branch names that you want to present in the list, 
you can use the Jenkins Minute 
video https://www.youtube.com/watch?v=5_tvlaIeQUQ as an example to 
parameterize the PIpeline job.

If you want the list of branches to be generated dynamically based on the 
contents of the repository, investigate the git parameter plugin 
at https://plugins.jenkins.io/git-parameter

Mark Waite

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1b4ea70c-58e0-4364-807f-6a27fa1e2f73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to