简体   繁体   中英

Force Jenkins to rebuild all branches in MultiBranch Pipeline project

I would like Jenkins to rebuild all existing git repository branches after scheduled branch indexing even if there were no changes since last build but right now I can do that only manually.

Checking branch MyBranch
Met criteria
No changes detected in MyBranch (still at db2c95ede39116529fec42a5fcdd54f0a2dd93d1)

Is there any way to trigger a scheduled build if it detects no changes?

Jenkins 2.7.4

I had the same need - I wanted a clean and a forced build every weekend. I used the Parameterized Trigger Plugin , created a new job:

原始管道和每周重建工作

I scheduled it the way I wanted, and added steps to trigger all the branches in the main job:

新作业手动触发主管道上的构建。

It is not very flexible, as you have to modify the builds to trigger each time you add a branch to your pipeline; it also defeats the "CI as code" and zero configuration principle; but if that's not something you do everyday, and have a procedure your developpers follow when they change something on Jenkins, you can write it down there and be just fine.

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