Mage-based release workflows for Fleet Server, replacing the former ingest-dev
fleet-server.mak
Makefile process. Process shape matches beats and elastic-agent (feature-freeze
and patch merge-timing labels); file updates stay limited to version/version.go
and .mergify.yml.
export PROJECT_OWNER="your-user"
export NEXT_RELEASE="9.6.0" # must already match version/version.go on main
export GITHUB_TOKEN=$(gh auth token)
export DRY_RUN=true
# Feature freeze
mage release:runMajorMinor
# Patch: NEXT_RELEASE is the version to land (NEW_VERSION)
export NEXT_RELEASE="9.6.1" # release branch must still be at 9.6.0
mage release:runPatch
go test ./dev-tools/mage/... -count=1Use plain X.Y.Z semver for NEXT_RELEASE (no -test or -SNAPSHOT suffixes).
NEXT_RELEASE is the version already on main (the line being frozen).
| Slot | Branch → base | Changes | Merge label |
|---|---|---|---|
| Release branch | X.Y from main |
pushed | — |
| PR-A | ff-prep-main-{CURRENT} → main |
Mergify backport + bump to next minor | merge:1-ff-day |
| PR-B | ff-release-{CURRENT} → X.Y |
ensure version.go = CURRENT (often no-op) |
merge:2-after-branch |
| PR-C | — | omitted (no docs/test-env) | — |
Next-patch bumps are not opened here; use mage release:runPatch.
NEXT_RELEASE is the version to land (NEW_VERSION from version-bump). The
release branch must already be at the previous patch. Docs stay off this path.
| Slot | Branch → base | Changes | Merge label |
|---|---|---|---|
| bump | update-version-{CURRENT} → X.Y |
bump version.go to CURRENT |
merge:4-after-release |
| Variable | Required | Default | Description |
|---|---|---|---|
NEXT_RELEASE |
yes | — | FF: version on base; patch: version to land (NEW_VERSION) |
GITHUB_TOKEN |
yes (unless dry run) | — | GitHub API token |
DRY_RUN |
no | false |
Only true enables dry run |
BASE_BRANCH |
no | main |
Base branch for feature freeze |
PROJECT_OWNER |
no | elastic |
GitHub owner |
PROJECT_REPO |
no | fleet-server |
GitHub repository |
PROJECT_REVIEWERS |
no | elastic/elastic-agent-control-plane |
PR reviewers |
Derived (not env-overridable): NEXT_PROJECT_MINOR_VERSION (minor+1), RELEASE_BRANCH (X.Y), LATEST_RELEASE (patch−1 from NEXT_RELEASE; empty when patch is 0).
version/version.go—DefaultVersion.mergify.yml— backport rule (PR-A)
| Step | Re-run behavior |
|---|---|
UpdateVersion |
No-op when version already matches |
UpdateMergify |
No-op when backport rule already exists |
| Branch creation | Reuses existing branch |
CommitAll |
Skips when worktree is clean |
CreatePR |
Returns existing open PR for same head/base |
dev-tools/mage/
├── release_settings.go # ReleaseSettings + env load (root module)
└── release/
├── config.go # type alias + Validate/EnsureLatestRelease
├── release.go
├── mergify.go
├── workflows.go
├── git.go / github.go / issue.go / version.go
└── README.md
Root mage release:* targets call the release package directly (same root go.mod).
go test ./dev-tools/mage/... -count=1Discard local workflow changes after review with git reset --hard HEAD.