Skip to content

Add automated CHANGELOG updates to ship-it job - #528

Open
ramonskie wants to merge 2 commits into
masterfrom
update-changelog
Open

Add automated CHANGELOG updates to ship-it job#528
ramonskie wants to merge 2 commits into
masterfrom
update-changelog

Conversation

@ramonskie

Copy link
Copy Markdown
Contributor

Summary

Automates CHANGELOG updates during buildpack releases in the ship-it job.

Changes

  • New task: tasks/update-changelog-for-release/

    • Extracts last version from existing CHANGELOG
    • Fetches all commits since last version tag
    • Formats commits as bullet points (matching scripts/bump format)
    • Prepends new version section to CHANGELOG
    • Commits with [ci skip] message
    • Updates .git/ref so buildpack-github-release tags the correct commit
  • Pipeline integration: Added task to ship-it job

    • Position: After write-version-file, before check-tag-not-already-added
    • Uses SSH key: ((cf-buildpacks-eng-github-ssh-key.private_key))

Format

Matches existing CHANGELOG conventions across all CF buildpacks:

```
v1.10.28 Jan 20, 2026

  • Commit subject line
    commit body indented by 2 spaces

  • Another commit

```

Implementation Details

  • Language: Bash (as requested - team migrating away from Ruby)
  • Filters: Removes Signed-off-by: and Co-authored-by: lines
  • Date format: `%b %d, %Y` (e.g., "Feb 20, 2025")
  • Separator: `=` characters matching header width
  • Git commit: Updates .git/ref to ensure GitHub release tags the CHANGELOG commit

Comparison with scripts/bump

This implementation replicates the behavior of the existing scripts/bump Ruby script, but:

  • ✅ Written in Bash (team preference)
  • ✅ Integrated into pipeline (not manual)
  • ✅ Receives version from Concourse semver resource
  • ✅ Commits automatically with [ci skip]

Testing Recommendations

  1. Test with one buildpack first (e.g., go-buildpack)
  2. Verify:
    • CHANGELOG updated correctly
    • Commit has [ci skip] message
    • GitHub release tags the CHANGELOG commit (not the version bump commit)
    • Release notes contain both manual and automated entries
  3. Monitor first release cycle for any issues

Rollback Plan

If issues occur, comment out the task in pipelines/buildpack/pipeline.yml:

```yaml

- task: update-changelog-for-release

file: buildpacks-ci/tasks/update-changelog-for-release/task.yml

params:

REPO_PRIVATE_KEY: ((cf-buildpacks-eng-github-ssh-key.private_key))

```

Then regenerate pipelines with ./bin/update-pipelines.

- Automatically updates CHANGELOG with commit messages since last release
- Formats entries matching existing buildpack convention (scripts/bump)
- Commits CHANGELOG with ci-skip marker to prevent pipeline re-trigger
- Updates .git/ref so buildpack-github-release tags the CHANGELOG commit
- Filters out Signed-off-by and Co-authored-by lines
- Uses bash implementation as requested (team migrating away from Ruby)
- Filter out merge commits (Merge pull request/branch)
- Filter out version bump commits (Bump to X.Y.Z)
- Filter out CI/config commits (Updating github-config, etc.)
- Filter out test framework updates (switchblade, brats)
- Filter out internal tooling commits
- Skip duplicate commit subjects
- Result: ~64% reduction in noise, keeping only user-facing changes (mainly dependency updates)

Tested on python-buildpack v1.8.33..HEAD: 61 commits → 22 kept (all dependency updates)
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.

1 participant