Skip to content

ci(ff): support feature freeze automation#49446

Draft
v1v wants to merge 11 commits intoelastic:mainfrom
v1v:feature/release-scripts-for-ff
Draft

ci(ff): support feature freeze automation#49446
v1v wants to merge 11 commits intoelastic:mainfrom
v1v:feature/release-scripts-for-ff

Conversation

@v1v
Copy link
Member

@v1v v1v commented Mar 12, 2026

Proposed commit message

This PR migrates the Beats release automation from Makefile-based scripts to a pure Go implementation using Mage, eliminating all external tool dependencies.

✨ Key Features

  • Mage Commands for complete release workflow automation
  • Pure Go Implementation - no external CLI tools (hub, gh, sed, yq, Python)
  • DRY_RUN Mode - safe testing without pushing changes or creating branches
  • Comprehensive Testing - 60%+ test coverage with unit tests
  • Detailed Documentation - both quick reference and comprehensive guides

Move away from centralised approach but support the FF automation as part of #48811

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • I have added an entry in ./changelog/fragments using the changelog tool.

Disruptive User Impact

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@v1v v1v self-assigned this Mar 12, 2026
@v1v v1v added skip-ci Skip the build in the CI but linting backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches backport-8.19 Automated backport to the 8.19 branch skip-changelog labels Mar 12, 2026
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 12, 2026
@botelastic
Copy link

botelastic bot commented Mar 12, 2026

This pull request doesn't have a Team:<team> label.

@github-actions
Copy link
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify
Copy link
Contributor

mergify bot commented Mar 13, 2026

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b feature/release-scripts-for-ff upstream/feature/release-scripts-for-ff
git merge upstream/main
git push upstream feature/release-scripts-for-ff

@v1v
Copy link
Member Author

v1v commented Mar 24, 2026

Test minor

dry-run mode for minor release
$ export PROJECT_OWNER="v1v"          
export CURRENT_RELEASE="9.5.0"
export GITHUB_TOKEN=$(gh auth token)
$ DRY_RUN=true mage release:runMajorMinor
=== Starting Major/Minor Release Workflow ===
Creating release branch: 9.5
Created branch: 9.5
Checked out branch: 9.5
Created branch: update-version-9.5.0
Checked out branch: update-version-9.5.0
Updating version files...
Updated version to 9.5.0 in libbeat/version/version.go
Updated libbeat/docs/version.asciidoc
Updated documentation files to version 9.5.0
Created commit: 28c0c7284dce3c6a3ac1cce8791bbf220519fae7

DRY RUN: Skipping push and PR creation
Branches created: 9.5, update-version-9.5.0
Review changes with 'git diff'
diff --git a/libbeat/docs/version.asciidoc b/libbeat/docs/version.asciidoc
index 036a42a9b6..1f54ae4d83 100644
--- a/libbeat/docs/version.asciidoc
+++ b/libbeat/docs/version.asciidoc
@@ -1,4 +1,4 @@
-:stack-version: 9.3.0
+:stack-version: 9.5.0
 :doc-branch: current
 :go-version: 1.25.8
 :release-state: unreleased
diff --git a/libbeat/version/version.go b/libbeat/version/version.go
index 4e8082b359..d7d9623d5f 100644
--- a/libbeat/version/version.go
+++ b/libbeat/version/version.go
@@ -18,4 +18,4 @@
 // Code generated by dev-tools/set_version
 package version
 
-const defaultBeatVersion = "9.4.0"
+const defaultBeatVersion = "9.5.0"
minor release
$ export PROJECT_OWNER="v1v"          
export CURRENT_RELEASE="9.5.0"
export GITHUB_TOKEN=$(gh auth token)
 $ DRY_RUN=false mage release:runMajorMinor
=== Starting Major/Minor Release Workflow ===
Creating release branch: 9.5
Created branch: 9.5
Checked out branch: 9.5
Created branch: update-version-9.5.0
Checked out branch: update-version-9.5.0
Updating version files...
Updated version to 9.5.0 in libbeat/version/version.go
Updated libbeat/docs/version.asciidoc
Updated documentation files to version 9.5.0
Created commit: c86061f3fb25d2efd24513fddce3cf350ec834c5
Checked out branch: 9.5
Pushed branch 9.5 to remote: origin
Checked out branch: update-version-9.5.0
Pushed branch update-version-9.5.0 to remote: origin
Added labels to #17: [release version]
Created PR #17: https://github.com/v1v/beats/pull/17

=== Major/Minor Release Workflow Complete ===
PR created: https://github.com/v1v/beats/pull/17

See https://github.com/v1v/beats/branches/all?query=9.5 and v1v#17

@v1v
Copy link
Member Author

v1v commented Mar 24, 2026

Test Patch

dry-run mode for patch release

$ export PROJECT_OWNER="v1v"
export GITHUB_TOKEN=$(gh auth token)
$ DRY_RUN=true BASE_BRANCH="9.3" CURRENT_RELEASE="9.3.4" mage release:runPatch
=== Starting Patch Release Workflow ===

--- Creating PR 1: Docs and Version ---
Created branch: update-docs-version-9.3.4
Checked out branch: update-docs-version-9.3.4
Updated version to 9.3.4 in libbeat/version/version.go
Updated libbeat/docs/version.asciidoc
Updated documentation files to version 9.3.4
Created commit: 55b218568238bc6a2d01aea335b530567c5c1e88

--- Creating PR 2: Test Environment ---
Checked out branch: 9.3
Created branch: update-testing-env-9.3.4
Checked out branch: update-testing-env-9.3.4
Updated test environment files from 9.3.3 to 9.3.4
No test environment changes to commit

DRY RUN: Skipping push and PR creation
Branches created: [update-docs-version-9.3.4]

patch release

$  DRY_RUN=false BASE_BRANCH="9.3" CURRENT_RELEASE="9.3.4" mage release:runPatch 
=== Starting Patch Release Workflow ===

--- Creating PR 1: Version ---
Checked out branch: 9.3
Created branch: update-version-9.3.4
Checked out branch: update-version-9.3.4
Updated version to 9.3.4 in libbeat/version/version.go
Created commit: 5d948b30f12dc42e7a3da31f81ebbde6a32dd964

--- Creating PR 2: Docs ---
Checked out branch: 9.3
Created branch: update-docs-9.3.4
Checked out branch: update-docs-9.3.4
Updated libbeat/docs/version.asciidoc
Updated documentation files to version 9.3.4
Created commit: 1387dcd9c38e538cd5b8be1086cae69de92dec77

--- Creating PR 3: Test Environment ---
Checked out branch: 9.3
Created branch: update-testing-env-9.3.4
Checked out branch: update-testing-env-9.3.4
Updated test environment in testing/environments/latest.yml
Updated test environment files to 9.3.3
Created commit: 32c058637936a070895a2f7713bc0d0a1f17b121
Checked out branch: update-version-9.3.4
Pushed branch update-version-9.3.4 to remote: origin
Checked out branch: update-docs-9.3.4
Pushed branch update-docs-9.3.4 to remote: origin
Checked out branch: update-testing-env-9.3.4
Added labels to #22: [release version]
Created PR #22: https://github.com/v1v/beats/pull/22
Added labels to #23: [release docs]
Created PR #23: https://github.com/v1v/beats/pull/23
Added labels to #24: [release testing]
Created PR #24: https://github.com/v1v/beats/pull/24
Successfully created 3 PRs

=== Patch Release Workflow Complete ===
PR 1: https://github.com/v1v/beats/pull/22
PR 2: https://github.com/v1v/beats/pull/23
PR 3: https://github.com/v1v/beats/pull/24

for 9.3.2 it produced

for 9.3.4 it produced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.19 Automated backport to the 8.19 branch backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches needs_team Indicates that the issue/PR needs a Team:* label skip-changelog skip-ci Skip the build in the CI but linting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant