Ian Brockbank
Ian Brockbank

Reputation: 507

Jenkins: How can I quickly list the downstream jobs triggered by a particular upstream job?

In our Jenkins setup, we have a common SonarQube job which is triggered by each of our other builds, passing in the upstream job details.

This is all fine and dandy, and works beautifully...except when it doesn't.

If a SonarQube job fails, it is then marked as fixed by the next SonarQube build...which is usually completely unrelated. I want to be able to check that the problem with that particular upstream build has been fixed. How can I quickly list all the SonarQube jobs triggered by that particular upstream build?

So, for clarity, we have jobs A, B, C, ... Z, all of which trigger SonarQube after they finish.

Job F has failed in SonarQube build 4567. SonarQube build 4568 was triggered by job H and passes, so as far as Jenkins is concerned, it's now passing. But I don't know if there is still a problem with the pipeline from job F.

We are now on SonarQube build 4608, and all subsequent builds were successful, but I don't know whether any of those were triggered by job F, or whether there is still a problem with job F. I could go into each of those 40 subsequent jobs checking the trigger, but that is painful...

Is there a better way that will allow me to find all the SonarQube jobs triggered by F without this manual exhaustive search?

Thanks,

Ian

Upvotes: 2

Views: 2872

Answers (2)

RoBeaToZ
RoBeaToZ

Reputation: 1243

Yet Another Build Visualizer shows up- und downstream builds for pipeline jobs, too.

Upvotes: 1

Ian Brockbank
Ian Brockbank

Reputation: 507

Okay, I've found my answer. The Build Pipeline Graph plugin does what I need:

http://www.bogotobogo.com/DevOps/Jenkins/Jenkins_Build_Pipeline_Dependency_Graph_Plugin.php

I set this up to show the pipeline from job F, and that showed me that it had successfully built twice since - and in fact showed me that the failure was because the SonarQube builds from F were in the opposite order to the builds of F itself (i.e. F build #29 triggered SonarQube build #6074 and F build #30 triggered SonarQube build #6073).

Upvotes: 1

Related Questions