Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
90a603e
ci(ff): support feature freeze automation phase 1
v1v Mar 12, 2026
831bfd3
ci(ff): support feature freeze automation phase 2
v1v Mar 12, 2026
043f9eb
ci(ff): support feature freeze automation phase 3
v1v Mar 12, 2026
79cf391
fix linting
v1v Mar 12, 2026
842cd1f
Merge branch 'main' into feature/release-scripts-for-ff
v1v Mar 23, 2026
9533815
go mod tidy
v1v Mar 23, 2026
e91354e
remove
v1v Mar 23, 2026
11d42f6
dry-run
v1v Mar 23, 2026
14dc49c
mergify: reorder
v1v Mar 23, 2026
ea53a5b
Merge branch 'main' into feature/release-scripts-for-ff
v1v Mar 24, 2026
d069e51
Merge upstream/main into feature/release-scripts-for-ff
fr4nc1sc0-r4m0n Jul 9, 2026
f3886bb
fix(release): satisfy gosec path traversal checks in release tooling
fr4nc1sc0-r4m0n Jul 9, 2026
a3f8375
Make release automation steps idempotent
fr4nc1sc0-r4m0n Jul 9, 2026
e57a65e
Merge branch 'main' into feature/release-scripts-for-ff
fr4nc1sc0-r4m0n Jul 9, 2026
15b86c9
fix(release): fix goimports formatting in github_test.go
fr4nc1sc0-r4m0n Jul 9, 2026
89180f5
Merge branch 'main' into feature/release-scripts-for-ff
fr4nc1sc0-r4m0n Jul 10, 2026
cddbe54
docs(release): use valid X.Y.Z version in local testing examples
fr4nc1sc0-r4m0n Jul 10, 2026
b295b36
Keep unstaged changes when creating release branch
fr4nc1sc0-r4m0n Jul 10, 2026
7e55b0f
Stage all worktree changes without recursing into submodules
fr4nc1sc0-r4m0n Jul 10, 2026
e1b7898
Use GITHUB_TOKEN for authenticated git push in release automation
fr4nc1sc0-r4m0n Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Release Process

Quick reference for running elastic-agent releases using mage automation.

## Prerequisites

```bash
# Install mage (if not already installed)
go install github.com/magefile/mage@latest

# Configure environment
export CURRENT_RELEASE="9.5.0"
export GITHUB_TOKEN="ghp_your_token_here"
```

## Major/Minor Release

### Automated (Recommended)

```bash
# Dry run first
export CURRENT_RELEASE="9.5.0"
export GITHUB_TOKEN="ghp_..."
export DRY_RUN=true
mage release:runMajorMinor

# Review changes, then run for real
export DRY_RUN=false
git checkout main && git pull origin main
mage release:runMajorMinor
```

### Manual Steps

```bash
# 1. Start clean
git checkout main && git pull origin main

# 2. Prepare release files
mage release:prepareMajorMinor

# 3. Review changes
git diff

# 4. Create release branch and commit
mage release:createBranch

# 5. Push branch
git push origin 9.5

# 6. Create pull request
mage release:createPR
```

## Patch Release

### Automated (Recommended)

```bash
# Dry run first
export CURRENT_RELEASE="9.4.1"
export BASE_BRANCH="9.4"
export GITHUB_TOKEN="ghp_..."
export DRY_RUN=true
git checkout 9.4 && git pull origin 9.4
mage release:runPatch

# Review changes, then run for real
export DRY_RUN=false
mage release:runPatch
```

### Manual Steps

```bash
# 1. Checkout release branch
export CURRENT_RELEASE="9.4.1"
export BASE_BRANCH="9.4"
git checkout 9.4 && git pull origin 9.4

# 2. Update files
mage release:updateVersion 9.4.1
mage release:updateDocs 9.4.1

# 3. Commit and push
git add -A
git commit -m "[Release] Prepare patch release 9.4.1"
git push origin 9.4
```

## Individual Commands

```bash
# Update version only
mage release:updateVersion 9.5.0

# Update docs only
mage release:updateDocs 9.5.0

# Update mergify only
mage release:updateMergify 9.5.0

# See all release commands
mage -l | grep release
```

## Environment Variables

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `CURRENT_RELEASE` | ✓ | - | Version to release (e.g., `9.5.0`) |
| `GITHUB_TOKEN` | ✓ | - | GitHub personal access token |
| `DRY_RUN` | | `false` | Preview mode (set to `true` to skip push/PR) |
| `BASE_BRANCH` | | `main` | Base branch for PRs |
| `PROJECT_OWNER` | | `elastic` | GitHub repository owner |
| `PROJECT_REPO` | | `elastic-agent` | Repository name |

## Troubleshooting

**"CURRENT_RELEASE environment variable not set"**
```bash
export CURRENT_RELEASE="9.5.0"
```

**"GITHUB_TOKEN environment variable not set"**
```bash
# Create token at: https://github.com/settings/tokens
export GITHUB_TOKEN="ghp_..."
```

**"failed to create branch: reference already exists"**
```bash
# Delete existing branch
git branch -D 9.5
# Or checkout existing branch
git checkout 9.5
```

## Full Documentation

For detailed documentation, see [dev-tools/mage/release/README.md](dev-tools/mage/release/README.md)

## Help

- **Issues**: https://github.com/elastic/elastic-agent/issues
- **Slack**: #ingest-team
- **Migration Plan**: [specs/MIGRATION_PLAN_ELASTIC_AGENT.md](specs/MIGRATION_PLAN_ELASTIC_AGENT.md)
Loading
Loading