简体   繁体   中英

Jenkins pipeline same job for multiple branches

I'm looking for a quite specific option for which I haven't been able to find anything useful online.

Basically what I want is a single Jenkins pipeline job...which is capable of building from several branches. GIT repo is the same...just different branches.

Preferably branches would get recognized by a certain name prefix.

it is a possibility? Please advice...

Here I am attaching an image that will built upon changes in Branches ie master , qa , development . Hope this helps.

多个分支构建作业

You can use regular expression in Branch Specifier to match branches with specific prefix using :<regex> :

:origin/prefix_.*

should match origin/prefix_<whatever>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM