Skip to content

CLP-988 Split build from analysis for sonar-html - #857

Merged
mary-georgiou merged 7 commits into
masterfrom
CLP-897
Oct 12, 2026
Merged

mary-georgiou merged 7 commits into
masterfrom
CLP-897

Conversation

@guillaume-dequenne

@guillaume-dequenne guillaume-dequenne commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Part of CLP-897; tracked by CLP-988.

Split Maven build/test/deploy from NEXT analysis so a failed analysis can be rerun using the producer's seven-day build artifact. The producer explicitly enables coverage; the consumer restores the output and reuses the same build number with build-maven@v2 scanner-only mode, released in 2.3.0.

Analysis runs on PRs, the default branch, maintenance branches and long-lived feature branches, matching the shared action's scan policy. Promotion requires successful build/QA dependencies and successful analysis where it runs, while accepting an intentional analysis skip on other refs. Producer and consumer use the same toolchain setup.

Validation: rebased onto current master (October 9), with no merge commits, checked the workflow YAML and diff whitespace, and exercised branch and promotion conditions across PR, main, maintenance, long-lived feature, dogfood, merge-queue and dispatch scenarios, including failures, skipped analysis and cancellation. The rebased tree matches the previously verified tree exactly. Latest-commit CI passed: Build and SCA Check.

IRIS now waits for NEXT analysis, and failure notifications include the analysis job.

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod Bot changed the title Split build from analysis for sonar-html CLP-988 Split build from analysis for sonar-html Sep 23, 2026
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

CLP-988

@github-actions

Copy link
Copy Markdown
Contributor

Ruling Report

✅ No changes to ruling expected issues in this PR

@sonarqube-next

Copy link
Copy Markdown

@sonarqube-next

sonarqube-next Bot commented Oct 1, 2026

Copy link
Copy Markdown

@datadog-sonarsource

This comment has been minimized.

Comment thread .github/workflows/build.yml
@sonarqube-next

sonarqube-next Bot commented Oct 9, 2026

Copy link
Copy Markdown

@mary-georgiou mary-georgiou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mary-georgiou
mary-georgiou merged commit eb74067 into master Oct 12, 2026
17 checks passed
@mary-georgiou
mary-georgiou deleted the CLP-897 branch October 12, 2026 08:24
@gitar-bot

gitar-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 closed / 1 findings

🟡 Medium risk · Splitting build and NEXT analysis changes CI promotion gates; condition or artifact-flow errors could block releases or promote builds without completed analysis.

Splits the Maven build from SonarHTML analysis by uploading build outputs as a seven-day artifact and restoring them in a separate analysis job, while reusing the same build number and scan configuration. IRIS no longer waits for the NEXT analysis it compares against, addressing that finding. No open issues remain.

✅ 1 closed
✅ Bug: IRIS no longer waits for the NEXT analysis it compares against

📄 .github/workflows/build.yml:60-74 📄 .github/workflows/build.yml:318-331
Before this PR, the NEXT analysis ran inside the build job. Because iris declares needs: [build, analyze-shadows], IRIS always started after the primary Next project had been analysed. This PR moves that analysis into the new analysis job, and iris was not updated to depend on it. In scheduled runs, analysis and analyze-shadows both start once build finishes and run in parallel. IRIS (primary_platform: Next, primary_project_key: org.sonarsource.html:html) can therefore start as soon as the shadows finish, while the NEXT analysis is still running. It would then compare the shadows against the previous run's Next data. It also still runs when the NEXT analysis fails. Fix: add analysis to the needs list of iris.

Verification

Functional validation No results

Rules No rules evaluated

Auto-approval Not enabled

Set up

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants