Skip to content

BUILD-8677 Add GitHub workflow job summaries and fix deployment documentation#225

Merged
julien-carsique-sonarsource merged 2 commits intomasterfrom
feat/jcarsique/BUILD-8677-actionSummary
Mar 4, 2026
Merged

BUILD-8677 Add GitHub workflow job summaries and fix deployment documentation#225
julien-carsique-sonarsource merged 2 commits intomasterfrom
feat/jcarsique/BUILD-8677-actionSummary

Conversation

@julien-carsique-sonarsource
Copy link
Contributor

@julien-carsique-sonarsource julien-carsique-sonarsource commented Mar 3, 2026

Summary

  • Add generate-summary input to all build actions (build-maven, build-gradle, build-npm, build-yarn, build-poetry) with default 'true', enabling a standardized Markdown job summary written to $GITHUB_STEP_SUMMARY after each build
  • Include $GITHUB_JOB in the summary heading so jobs sharing the same action are distinguishable in the GitHub UI
  • Fix bug: build-npm, build-yarn, and build-poetry summaries checked a non-existent output should-deploy; corrected to deployed
  • Add $GITHUB_JOB to the promote action summary as well for consistency

Documentation (README)

  • Document generate-summary input in all five build actions' Inputs tables
  • Add standalone Deployment Strategy section (replaces the Maven-specific one) with a table verified against all implementations
  • Remove all ### Features subsections (redundant, inconsistent, low value) and rescue useful content inline
  • Document inconsistencies found during review (as TODOs for a follow-up task):
    • build-gradle does not filter SonarQube analysis by branch type (runs on dogfood/other branches unlike all other actions)
    • build-npm, build-yarn, build-poetry lack the deploy: 'false' override input available in build-maven/build-gradle
    • Long-lived feature branch (feature/long/*) deployment is enabled in build-maven/build-gradle but disabled in build-npm/build-yarn/build-poetry

Follow-up

Inconsistencies documented with TODO BUILD-10586 comments.

Test plan

  • Verify generate-summary step renders correctly in GitHub Actions job summary UI (build succeeded / failed, project, version, build number, branch, commit, deployment link)
  • Verify job name appears in the summary heading when multiple jobs use the same action
  • (skipped) Verify the summary step is skipped when generate-summary: 'false' is set
  • (skipped) Verify the summary step still runs when the build step fails (if: always())
  • Confirm deployed output drives the deployment section in the summary

Tests

Repository PR Action tested Run
sonar-dummy #561 build-maven 22629831990
sonar-dummy-gradle-oss #333 build-gradle 22629834202
sonar-dummy-js #120 build-npm 22629835916
sonar-dummy-maven-enterprise #125 build-maven 22629837873
sonar-dummy-python-oss #80 build-poetry 22629839505
sonar-dummy-yarn #45 build-yarn 22629841964

@hashicorp-vault-sonar-prod
Copy link

hashicorp-vault-sonar-prod bot commented Mar 3, 2026

BUILD-8677

julien-carsique-sonarsource added a commit to SonarSource/sonar-dummy-gradle-oss that referenced this pull request Mar 3, 2026
Testing SonarSource/ci-github-actions#225

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
julien-carsique-sonarsource added a commit to SonarSource/sonar-dummy-js that referenced this pull request Mar 3, 2026
Testing SonarSource/ci-github-actions#225

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
julien-carsique-sonarsource added a commit to SonarSource/sonar-dummy-python-oss that referenced this pull request Mar 3, 2026
Testing SonarSource/ci-github-actions#225

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
julien-carsique-sonarsource added a commit to SonarSource/sonar-dummy-python-oss that referenced this pull request Mar 3, 2026
Testing SonarSource/ci-github-actions#225

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@julien-carsique-sonarsource julien-carsique-sonarsource marked this pull request as ready for review March 3, 2026 15:47
@julien-carsique-sonarsource julien-carsique-sonarsource requested a review from a team as a code owner March 3, 2026 15:47
Copilot AI review requested due to automatic review settings March 3, 2026 15:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR standardizes GitHub Actions job summaries across the build actions and promote, and updates the README to document the new generate-summary input and consolidate deployment strategy documentation.

Changes:

  • Add a generate-summary input (default 'true') to build actions and gate the summary step behind it; include $GITHUB_JOB in summary headings for easier differentiation.
  • Fix build summary logic in build-npm, build-yarn, and build-poetry to use the correct steps.build.outputs.deployed output.
  • Rework README sections: document generate-summary, introduce a unified “Deployment Strategy” section, and remove redundant “Features” subsections.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
spec/promote_spec.sh Extends test env to include GITHUB_JOB required by the updated promote script.
promote/promote.sh Requires GITHUB_JOB and includes it in the promotion job summary heading.
build-npm/build.sh Adds TODO notes about DEPLOY override consistency (no functional change).
build-npm/action.yml Adds generate-summary, includes $GITHUB_JOB in summary heading, fixes deployment check to deployed.
build-yarn/build.sh Adds TODO notes about DEPLOY override consistency (no functional change).
build-yarn/action.yml Adds generate-summary, includes $GITHUB_JOB in summary heading, fixes deployment check to deployed.
build-poetry/build.sh Adds TODO notes about DEPLOY override consistency (no functional change).
build-poetry/action.yml Adds generate-summary, includes $GITHUB_JOB in summary heading, fixes deployment check to deployed.
build-maven/action.yml Includes $GITHUB_JOB in the summary heading (generate-summary already present).
build-gradle/build.sh Adds TODO note documenting known sonar branch-filtering inconsistency.
build-gradle/action.yml Adds generate-summary and includes $GITHUB_JOB in the summary heading.
README.md Documents generate-summary, adds unified “Deployment Strategy”, and restructures sections.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Add `$GITHUB_JOB` to the ## heading in all build and promote summaries so jobs sharing the same action are distinguishable
- Add missing `generate-summary` input to build-gradle, build-npm, build-poetry, build-yarn (was already present in build-maven). Generalize #222
- Fix bug: build-npm/poetry/yarn summary checked non-existent output `should-deploy`; corrected to `deployed`. Fix #136
- Fix build-yarn: missing blank lines before outputs: and summary step

Update README for workflow summary changes

- Document `generate-summary` input in build-maven, build-gradle, build-npm, build-poetry, and build-yarn Inputs tables
- Add "GitHub workflow job summary" entry to Features sections for build-maven, build-gradle, build-npm, build-yarn, and promote

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove all ### Features sections that were either redundant with the action description or contained generic boilerplate. Rescue the
branch-strategy information from build-maven as a proper Deployment Strategy table, and rescue the build-gradle gradlew fallback note
into the action description.

Move Deployment Strategy to standalone section and fix inaccuracies

Move the deployment strategy table out of build-maven into a shared standalone section (grouped with Provenance Attestation) since it applies
to all build actions.

Fix inaccuracies verified against implementation:
- feature/long/* branches DO deploy (was incorrectly marked as no)
- "master" renamed to "Default branch" (configured via DEFAULT_BRANCH)
- Remove Maven-specific "Notes" column that did not apply to other actions
- Add build-gradle exception: sonar analysis not branch-filtered in Gradle

Note build-gradle sonar branch filtering as a known bug

Add a TODO comment in build-gradle/build.sh and update the README to flag that sonar analysis is not filtered by branch type in build-gradle,
unlike all other build actions. Should add a should_scan() guard to skip sonar on dogfood/other branches consistently.

Fix deploy input verification: document inconsistencies and add TODOs

- Fix README Deployment Strategy table: long-lived feature branches only deploy for build-maven and build-gradle, not for build-npm/build-yarn/build-poetry
- Add note that deploy:'false' override is only supported by build-maven and build-gradle
- Add TODO comments to build-npm, build-yarn, build-poetry noting the missing DEPLOY env var support and long-lived feature branch deploy discrepancy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-8677-actionSummary branch from 8ddc699 to c176b03 Compare March 3, 2026 17:30
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 3, 2026

SonarQube reviewer guide

Review in SonarQube

Summary: Documentation restructuring and feature consistency updates across build actions. The PR removes feature lists from individual action sections, consolidates deployment strategy documentation, relocates AI migration guidance, adds generate-summary input parameter to build actions, and fixes workflow summary generation bugs.

Review Focus: Pay attention to:

  1. The new generate-summary input additions across build actions (Maven, Gradle, NPM, Yarn, Poetry) and their conditional logic in workflow summaries
  2. Bug fixes in workflow summary output variable references (should-deploydeployed in NPM, Yarn, Poetry)
  3. Added TODO comments flagging known inconsistencies in deployment behavior across build scripts (BUILD-10586)
  4. The consolidated "Deployment Strategy" section replacing scattered feature documentation
  5. Job name (${GITHUB_JOB}) additions to summary headers for multi-job clarity

Start review at: README.md. This is the primary change file that documents all action interfaces and behavior. Understanding the documentation restructuring and new generate-summary parameter specification is essential before reviewing the corresponding implementation changes in individual action files.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
4 Accepted issues
0 Dependency risks

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

Copy link
Contributor

@bwalsh434 bwalsh434 left a comment

Choose a reason for hiding this comment

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

LGTM!

@julien-carsique-sonarsource julien-carsique-sonarsource merged commit 56a7ed3 into master Mar 4, 2026
13 checks passed
@julien-carsique-sonarsource julien-carsique-sonarsource deleted the feat/jcarsique/BUILD-8677-actionSummary branch March 4, 2026 10:44
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.

3 participants