Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Define selective blocking of upstream/downstream jobs in Jenkins

Tags:

jenkins

I have a setup of multiple jobs with automated triggering between them.

All of the jobs have both 'Block build when upstream project is building' and 'Block build when downstream project is building' set to true. It worked fine until the need for additional job for upload the other jobs' artifacts appeared.

It is a lengthy process which I don't want to block the whole building pipeline. So I separated it as a job. It is triggered by all other jobs and pushes artifacts to a remote server with low-bandwidth connection.

But they still wait due to the settings mentioned.

Is there a way to make them not wait for this particular job? Maybe the approach is wrong and it should not be a downstream job for them? If not - how to monitor other jobs executions and gather the results easily? Maybe there is some non-blocking alternative for ArtifactDeployer, that just sets the task and finishes - I don't need to collect the results of the upload job?

like image 280
maciasello Avatar asked Apr 08 '13 17:04

maciasello


1 Answers

I found the answer myself. It was just before my eyes...

I missed very important part of Parametrized Trigger Plugin: If you use it as a build step and not post-build action it can either wait or not wait for result of downstream job. Downstream appears as '(non-blocking)' subproject of the upstream job.

like image 110
maciasello Avatar answered Oct 12 '22 16:10

maciasello