Blocking Pipeline builds while Up- and Downstream Dependencies are building

115 views
Skip to first unread message

StuporMundi

unread,
Aug 11, 2016, 2:45:10 AM8/11/16
to Jenkins Users
Hi everyone,

I have a question regarding pipeline jobs in Jenkins 2.x. For freestyle jobs one always had the possibility to block their execution while one of their up and/or downstream dependencies were building (Advanced Project Options --> Block build when upstream/downstream project is building). For a pipeline or multi branch pipeline job these options are not available. Is there any other means by which I can achieve the effect those options had?

To my surprise Google did not yield anything on that topic; I also tried stack overflow but my post went largely unnoticed. I would have thought that serializing dependent jobs would be a common requirement - or should I reconsider my build strategy?

Anyway... Any input on that topic would be highly appreciated.
Many thanks

    V

Baptiste Mathus

unread,
Aug 11, 2016, 4:41:20 PM8/11/16
to jenkins...@googlegroups.com

Though I think it should still be feasible, the fact you don't much reference about it is IMO possibly because you're more likely to actually not have upstream or downstream build at all.

Instead of having say a build, then a test, then a deploy build you have only one pipeline, possibly leveraging the `parallel` step where needs be.

Cheers


--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/66809c95-3f16-4671-88ba-676ffe361106%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

StuporMundi

unread,
Aug 11, 2016, 6:13:25 PM8/11/16
to Jenkins Users, m...@batmat.net
Hi,

sorry, I probably should have described it more precise...
I do in fact have my pipeline set up the way you suggested it: There's a stage for the build (on different platforms, potentially in parallel), there's a stage for the tests (again on different platforms) and there is a deployment stage that copies the relevant files to a file server if the previous stages did end successfully.

However, the complete product consists of a few dozen shared objects and executables, several documentation files to go with them and of course the installer packages. So I have a total of about 300 jenkins projects configured on our build server. These are currently either matrix or freestyle projects - but even though I made an effort to centralize as many parts of the projects as possible, the whole setup is not as flexible as I'd like it to be as changes/improvements to the build scripts are time-consuming to apply to so many projects, which is why I'd gladly switch to scripted pipelines. But of course I wouldn't want to e.g. have one of the documentation builders to overwrite a pdf file while it is being packaged into an installer by one of the installer builders. So the synchronization mechanism that the two aforementioned options offer on the freestyle projects are as far as I can see an essential feature for the setup I am maintaining.

That's why I am looking for a way to get the same feature on a pipeline...
Reply all
Reply to author
Forward
0 new messages