简体   繁体   中英

When using multi-branch pipline Jenkins?

When do you use multi-branch pipline on Jenkins and when do you use a freestyle project?

When developing web applications with several developers you always have to use a multi-branch pipline, don't you? Because every branch should be built and tested independently? That every developer on the branch he works on has an overview of his code.

I'm just reading up on this topic, so excuse me if I say something wrong.

A Multi Branch pipeline in jenkins is used when you have several branches, maintain Jenkinsfile (that contains a pipeline definition) per branch and it slightly differs from branch to branch. If you want to create a Jenkins Job per branch automatically, you should use a multi branch pipeline. Jenkins automatically finds the Jenkinsfile that is maintained in the source control (git in your case, assuming the tags in the question). This eliminates the need to define jenkins job "manually" per branch, so you define the job only once.

Now the decision whether to work this way or not is totally yours, some projects successfully run without using this feature, other projects do rely on it, its a tool after all.

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