Skip to content

fix(ci): overhaul release pipeline, fix versions, add RELEASING.md - #503

Merged
seanstory merged 3 commits into
mainfrom
fix/release-pipeline-overhaul
Sep 18, 2026
Merged

seanstory merged 3 commits into
mainfrom
fix/release-pipeline-overhaul

Conversation

@seanstory

Copy link
Copy Markdown
Member

Summary

Release pipeline rewrite (.buildkite/release-pipeline.yml)

  • Default-safe: New "Build type" input defaults to Snapshot. Release builds require the operator to explicitly choose "Release" AND trigger from an N.N branch. Releasing from main is rejected.
  • Fixes build Configure Renovate #75 race: The old "Determine if snapshot" step ran inside the build groups (parallel with the build), so is_snapshot could be read before it was set. Now resolved in a single sequential step before any build runs.
  • Belt-and-suspenders validation in publish-common.sh — fails loudly if is_snapshot is missing or garbled.

Version fix

  • Bumps product_version on main from 1.0.1 → 1.1.0. The 1.0.x version numbers belong on the 1.0 maintenance branch.

Documentation

  • Adds RELEASING.md documenting the release process, branch model, and post-release checklist.

Test plan

  • Trigger the release pipeline from main with default settings → confirm SNAPSHOT image published
  • Trigger the release pipeline from main and choose "Release" → confirm it is rejected
  • Trigger the release pipeline from 1.0 with "Snapshot" → confirm SNAPSHOT image published
  • Trigger the release pipeline from 1.0 with "Release" → confirm release image published

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
🤖 Generated with Claude Code

seanstory and others added 2 commits September 18, 2026 10:51
Three changes:

1. Add explicit 'Build type' input that defaults to Snapshot. Release
   builds require the operator to actively choose 'Release' AND trigger
   from an N.N branch — releasing from main is rejected.

2. Fix the snapshot detection race from build #75. The old 'Determine if
   snapshot' step ran inside the build groups (parallel with the build),
   so is_snapshot could be read before it was set. Now resolved in a
   single sequential step before any build runs.

3. Add is_snapshot validation in publish-common.sh — fail loudly if the
   value is missing or garbled rather than silently publishing a release.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
main's product_version was incorrectly set to 1.0.1, which conflicts with
the 1.0 maintenance branch where patch releases belong. Bump to 1.1.0.

Add RELEASING.md documenting the release process, branch model, and
post-release steps.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Copilot AI 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.

🟡 Changes recommended

Release builds must be restricted to exact N.N maintenance branches.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Overhauls the release pipeline, updates the main product version to 1.1.0, and documents the release process.

Changes:

  • Adds explicit Snapshot/Release selection and sequential metadata resolution.
  • Validates snapshot metadata before publishing.
  • Adds release and branch-model documentation.
File summaries
File Description
RELEASING.md Documents release procedures and branch conventions.
product_version Updates the main development version.
.buildkite/release-pipeline.yml Adds build-type selection and release validation.
.buildkite/publish/publish-common.sh Validates snapshot metadata.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .buildkite/release-pipeline.yml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@seanstory
seanstory merged commit 7fee83c into main Sep 18, 2026
2 checks passed
@seanstory
seanstory deleted the fix/release-pipeline-overhaul branch September 18, 2026 17:28
@github-actions

Copy link
Copy Markdown

💔 Failed to create backport PR(s)

The backport operation could not be completed due to the following error:
There are no branches to backport to. Aborting.

The backport PRs will be merged automatically after passing CI.

To backport manually run:
backport --pr 503 --autoMerge --autoMergeMethod squash

erikcurrin-elastic added a commit that referenced this pull request Sep 18, 2026
## Summary

Fixes a regression introduced in #503 where the outer `if [[
"$BUILD_TYPE" == "release" ]]` guard was accidentally dropped from the
"Resolve build type" step.

**Bug:** The branch pattern check (`^[0-9]+\.[0-9]+$`) ran
unconditionally, so any Snapshot build triggered from `main` would fail
immediately with a misleading error:
> ERROR: Release builds require an N.N branch (for example, 1.0)

**Fix:** Restore the missing `if [[ "$BUILD_TYPE" == "release" ]]; then`
wrapper so the branch guard only runs for Release builds.

## Test plan

- [ ] Trigger the release pipeline from `main` with default Snapshot
settings → confirm SNAPSHOT image published (was broken before this fix)
- [ ] Trigger the release pipeline from `main` and choose "Release" →
confirm it is rejected
- [ ] Trigger the release pipeline from `1.0` with "Release" → confirm
release image published

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

💚 Backport PR(s) successfully created

Status Branch Result
✅ 1.0 #510

This backport PR will be merged automatically after passing CI.

Jan-Kazlouski-elastic added a commit that referenced this pull request Oct 5, 2026
The backported #503 bumped product_version from 1.0.1 to 1.1.0. That is
correct for main, which tracks the next minor line, but wrong here: the
1.0 branch owns the 1.0.x patch line and the release pipeline reads this
file to determine the published image tag.
Jan-Kazlouski-elastic added a commit that referenced this pull request Oct 5, 2026
….md (#503) (#510)

Backports the following commits to 1.0:
- fix(ci): overhaul release pipeline, fix versions, add RELEASING.md
(#503)

---------

Co-authored-by: Sean Story <sean.j.story@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Erik Currin <erik.currin@elastic.co>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: “Jan-Kazlouski-elastic“ <jan.kazlouski@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants