One pipeline build analyses two projects, with waitForQualityGate after each analysis. The job page then shows the first project twice (with its status) and never the second one. The build itself looks fine: it has two SonarAnalysisAction with different ceTaskId.
I think the cause is in SQProjectResolver.resolve(): it returns build.getAction(ProjectInformation.class) when one exists. Every waitForQualityGate call adds a ProjectInformation to the run, and getAction() always returns the first one, so every analysis gets the first project’s data.
Matching the ProjectInformation on the ceTaskId should fix it.
Hey @arox, welcome to the Community! This is a limitation that has been in our radar for a while, but I guess it never got enough traction and is still in the backlog. I’m going to flag this for the team to make sure they’re aware.
I just wanted to note that this is mostly a cosmetic issue. Yes, it is confusing, but as long as you wait for the quality gate status after each project analysis, the pipeline is actually enforcing the quality gate correctly.
Same issue here, same versions: Jenkins 2.580.1, SonarQube Scanner for Jenkins 2.19.0, SonarQube Server 2026.4 (26.4).
Our pipeline analyses two projects in one build (a C++ backend and its web UI, each with its own quality gate), each in its own withSonarQubeEnv block followed by waitForQualityGate. As in the first post, the two SonarAnalysisActions have the right ceTaskIds, and each waitForQualityGate checks the right task, so the gates are enforced correctly.
One point that makes this more than cosmetic for us: the second row doesn’t only reuse the first project’s name. Its badge status and link come from the first project too, because the whole ProjectInformation is returned. If the second project’s gate fails while the first one passes, the job page shows “Passed” twice. Anyone looking at the job page (rather than the build log) gets a wrong answer.
+1 for matching the ProjectInformation on the ceTaskId (or skipping the webhook shortcut when the build has more than one analysis). Thanks for flagging it to the team.
Yes I can confirm you it’s “cosmetic”. In Sonar everything is done properly the issue is only in Jenkins intself, this causes the traffic-light-prococol color coding providing misleading information that’s all.