Skip to content

Fix formatting in SonarQube documentation - #197

Merged
vpPavithra merged 9 commits into
masterfrom
feat-sonarqube-integration-v2
Sep 7, 2026
Merged

vpPavithra merged 9 commits into
masterfrom
feat-sonarqube-integration-v2

Conversation

@princegupta1131

Copy link
Copy Markdown

No description provided.

Previously this workflow only ran on push to master, so a PR raised
against master got no CI feedback until after it was merged. Added a
pull_request trigger scoped to base branch master (any source branch),
alongside the existing push:master trigger -- not a broad re-add of
per-branch push/PR triggers, just PR-targets-master.

No job steps changed. actions/checkout@v4 already handles both push
and pull_request events correctly by default (checks out the PR merge
ref for pull_request, HEAD for push), so no further changes needed.
…ilures

Every workflow run since at least 2026-08-07 (push-to-master included,
not just today's new pull_request trigger) has failed at the SonarCloud
scan step with the same error: "Failed to query JRE metadata ... HTTP
403 ... check sonar.token or SONAR_TOKEN" -- the job runs and reaches
the scan step, but the token it sends is rejected/empty.

The job was gated behind a GitHub Environment named `sonarcloud` via
`environment: sonarcloud`. A reference workflow from a sibling project
that scans successfully has no such gate -- its SONAR_TOKEN comes
straight from repository secrets. Removed the environment reference so
this job does the same.

This does not guarantee a fix on its own: if SONAR_TOKEN was only ever
configured as an environment secret under "sonarcloud" and never also
added as a plain repository secret, the token will still be unavailable
after this change. Whoever has repo admin access needs to confirm
SONAR_TOKEN exists under Settings -> Secrets and variables -> Actions ->
Repository secrets (not just under Environments -> sonarcloud), and
regenerate it on SonarCloud's side if unsure it's still valid.
Workflow name SonarCloud -> Build, job id sonarcloud -> sonarqube, job
display name SonarCloud analysis -> SonarQube, step name SonarCloud
scan -> SonarQube Scan -- matching the naming used by a working
reference workflow from a sibling project. If master's branch
protection has a required status check configured against that exact
name, a mismatch here would mean this check could never satisfy it.
No other file in the repo references the old names (checked README
and docs), so nothing else needs updating.
Pure filename change (git mv, tracked as a rename) -- GitHub Actions
discovers workflows by scanning .github/workflows/ regardless of
filename, so this has no behavioral effect on when/how the workflow
runs. Matches the reference workflow's filename from a sibling
project, consistent with the earlier name/job-id alignment.

Updated the two live doc references in docs/sonarqube.md that pointed
at the old path. Left docs/PROD-VERIFICATION.md's CHANGE 44 entry
untouched -- it's a dated changelog record of what the file was
called at that point in time, not a current-state reference.
types: [opened, synchronize, reopened] is GitHub Actions' own default
when the pull_request trigger omits types, so this is a no-behavior-
change clarification, not a fix -- spelling out what was already
happening implicitly, matching the reference workflow's style, and
giving a natural place to add more types later if ever needed.
@vpPavithra
vpPavithra merged commit e9b50b4 into master Sep 7, 2026
1 check passed
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