Skip to content

chore(ci): normalize and align CD pipeline (#314)#315

Merged
nanotaboada merged 4 commits intomasterfrom
ci/normalize-cd-pipeline
Apr 11, 2026
Merged

chore(ci): normalize and align CD pipeline (#314)#315
nanotaboada merged 4 commits intomasterfrom
ci/normalize-cd-pipeline

Conversation

@nanotaboada
Copy link
Copy Markdown
Owner

@nanotaboada nanotaboada commented Apr 11, 2026

Summary

Improve the CD pipeline: add multi-platform image support (amd64 + arm64), enable build provenance attestation, and tighten changelog generation and release metadata.

Changes

  • id-token: write permission added to release job (required for attestation)
  • Set image name step dropped; ${{ github.repository }} used directly throughout
  • provenance: falseprovenance: mode=max
  • Attest build provenance step added after image push (actions/attest-build-provenance@v2)
  • Changelog format: "- %s""- %s (%h)" (adds short hash)
  • Empty changelog guard added (No new changes since $PREVIOUS_TAG)
  • draft: false, prerelease: false, generate_release_notes: true made explicit

Test plan

  • Workflow YAML is valid (no syntax errors)
  • On next tag push, test job passes before release job starts
  • Docker image published for both linux/amd64 and linux/arm64
  • Build provenance attestation visible on the GitHub Release
  • Changelog in release body excludes merge commits and includes short hashes

Closes #314

🤖 Generated with Claude Code


This change is Reviewable

Summary by CodeRabbit

  • Chores
    • Strengthened supply chain security by enabling build provenance and publishing provenance attestations for released images
    • Standardized Docker image tagging and simplified release/body examples
    • Improved changelog entries to include short commit references and show a “No new changes” message when empty
    • Enabled non-draft, non-prerelease releases and automatic release note generation

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ba700078-68f5-4f44-b0e0-c41c076adb6e

📥 Commits

Reviewing files that changed from the base of the PR and between 34d27a9 and 5dc788e.

📒 Files selected for processing (1)
  • .github/workflows/maven-cd.yml

Walkthrough

Updates the Maven CD GitHub Actions workflow to enable build provenance attestation, adjust Docker image tagging to use github.repository, change provenance to mode=max, add attest-step and required permissions, tighten changelog generation (short hashes and empty-guard), and set explicit GitHub Release options with generated release notes.

Changes

Cohort / File(s) Summary
CI/CD Workflow
.github/workflows/maven-cd.yml
Updated release job permissions (id-token: write, attestations: write); removed intermediate image-name step and switched tags to ghcr.io/${{ github.repository }}; changed Docker provenance to mode=max; added actions/attest-build-provenance step using push digest; adjusted changelog generation to append (%h) and add empty-changelog guard; simplified release body and set draft:false, prerelease:false, generate_release_notes:true.

Sequence Diagram

sequenceDiagram
    participant GHA as GitHub Actions
    participant OIDC as OIDC Provider
    participant GHCR as GHCR (Registry)
    participant Attest as Attestation Service

    GHA->>GHA: Build image (platforms: amd64, arm64) with provenance=mode=max
    GHA->>OIDC: Request id-token (id-token: write)
    OIDC-->>GHA: Return OIDC token
    GHA->>GHCR: Push image (ghcr.io/${{ github.repository }})
    GHCR-->>GHA: Return image digest
    GHA->>Attest: Publish provenance attestation (subject: push digest)
    Attest-->>GHA: Attestation recorded
    GHA->>GHA: Create GitHub Release (generate_release_notes: true, draft:false, prerelease:false) with changelog
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Assessment against linked issues

Objective Addressed Explanation
Add (%h) short hash to commit format and enable generated release notes [#314]
Add empty changelog guard and set draft:false / prerelease:false [#314]
Add id-token: write permission and actions/attest-build-provenance step [#314]
Set provenance to mode=max and remove intermediate image-name step [#314]
Add --no-merges flag to git log command [#314] Change log formatting was updated to include (%h) and an empty-guard was added, but the diff does not explicitly show --no-merges being added to the git log command.

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits format (chore(ci):), is well under 80 characters (49 characters), and accurately describes the main changes: normalizing and aligning the CD pipeline to enable build provenance attestation and multi-platform Docker image support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/normalize-cd-pipeline
  • 🛠️ sync documentation: Commit on current branch
  • 🛠️ sync documentation: Create PR
  • 🛠️ enforce http error handling: Commit on current branch
  • 🛠️ enforce http error handling: Create PR
  • 🛠️ idiomatic review: Commit on current branch
  • 🛠️ idiomatic review: Create PR
  • 🛠️ verify api contract: Commit on current branch
  • 🛠️ verify api contract: Create PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (79ed48d) to head (5dc788e).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##              master      #315   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity        30        30           
===========================================
  Files              2         2           
  Lines             88        88           
  Branches           8         8           
===========================================
  Hits              88        88           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/maven-cd.yml:
- Around line 118-125: The fallback message for an empty CHANGELOG currently
always says "No new changes since $PREVIOUS_TAG", which becomes "No new changes
since " on the first release; update the conditional that checks if [ -z
"$CHANGELOG" ] to branch on whether PREVIOUS_TAG is set: if PREVIOUS_TAG is
non-empty emit "No new changes since $PREVIOUS_TAG", otherwise emit a clear
first-release message like "No changes (first release)". Change the logic that
sets CHANGELOG (and the subsequent if [ -z "$CHANGELOG" ]) to use PREVIOUS_TAG
to select the appropriate fallback text.
- Around line 36-39: The release job's permissions block is missing
attestations: write which is required by the actions/attest-build-provenance@v2
step to persist build provenance; update the permissions mapping in the release
job to include attestations: write alongside contents: write, packages: write,
and id-token: write so the attestation step can succeed.
- Around line 106-110: The Attest build provenance step using
actions/attest-build-provenance@v2 is missing the push-to-registry input; update
the workflow step that defines subject-name and subject-digest to include
push-to-registry: true so the attestation is pushed to the GHCR registry (i.e.,
add the push-to-registry: true input alongside subject-name: ghcr.io/${{
github.repository }} and subject-digest: ${{ steps.push.outputs.digest }}).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 90b5f1ed-cb81-4da7-9380-90d2e2a35ce5

📥 Commits

Reviewing files that changed from the base of the PR and between 79ed48d and 34d27a9.

📒 Files selected for processing (1)
  • .github/workflows/maven-cd.yml

nanotaboada and others added 2 commits April 11, 2026 10:01
- Add attestations: write permission required by attest action
- Add push-to-registry: true to push attestation to GHCR
- Fix empty changelog fallback message when PREVIOUS_TAG is unset

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
- Drop Quick Start section from release body (belongs in README)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@nanotaboada nanotaboada force-pushed the ci/normalize-cd-pipeline branch from 1b179bb to 5dc788e Compare April 11, 2026 13:14
@sonarqubecloud
Copy link
Copy Markdown

@nanotaboada nanotaboada merged commit e6f656e into master Apr 11, 2026
12 checks passed
@nanotaboada nanotaboada deleted the ci/normalize-cd-pipeline branch April 11, 2026 13:35
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.

chore(ci): normalize and align CD pipeline

1 participant