goroncy
goroncy

Reputation: 2091

Jenkins: how to block a job to make it unrunnable

This is not just another question about concurrent job execution in Jenkins. The problem I have is that there are several jobs that run independently from one another. When they finish it should be possible to run a manual job. The condition though is that all those automated jobs should be in successful state. Otherwise it should not be possible to run this manual job. It should also not be possible to run or even schedule run of this manual job if those other jobs are running.

I searched for the answer everywhere and checked every possible plugin that serves synchronization. But I did not figure it out how to solve the above problem.

Upvotes: 3

Views: 584

Answers (3)

Dawid Gosławski
Dawid Gosławski

Reputation: 2088

https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin can also be option. Setup promotions in that way that manual approval is needed and build will not fail only if automated jobs are done.

Upvotes: 0

user745733
user745733

Reputation:

IMHO the delivery pipeline plugin (see https://wiki.jenkins-ci.org/display/JENKINS/Delivery+Pipeline+Plugin for the download and http://www.infoq.com/articles/orch-pipelines-jenkins for a thorough description) could do what you want.

You can run a lot of jobs (in parallel or not), and when (and only when) they succeed another job (or more). You even can add manual steps (needing a button click when your pipeline may continue). Everything is configurable - and quite stable at this moment.

No-one should be able to manually (or otherwise) start a job that is in "waiting state" for other jobs to finish.

Upvotes: 1

Bruno Lavit
Bruno Lavit

Reputation: 10382

Regarding this question: Otherwise it should not be possible to run this manual job. It should also not be possible to run or even schedule run of this manual job if those other jobs are running.

You can use the Throttle Concurrent Builds Plugin and create a category which will include your automated jobs and the manual jobs.

If one automated job is running, it will be impossible to launch the manual jobs.

Regarding your first question, did you have a look to the Join plugin?

Cheers

Upvotes: 0

Related Questions