Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e347eeb
feat: automate release steps as requested in #7500
ADITYATIWARI342005 Sep 23, 2025
16698e0
fix: Implemented: wrapper for naming consistency; documented and wire…
ADITYATIWARI342005 Sep 23, 2025
85f2c94
feat(release): add prepare-release wrapper, tighten dry-run, implemen…
ADITYATIWARI342005 Sep 23, 2025
5407cad
fix : simplify start.sh and prepare.sh per review; remove tagging an…
ADITYATIWARI342005 Sep 23, 2025
28cbb07
Update Makefile
ADITYATIWARI342005 Sep 24, 2025
72eac69
Update scripts/release/prepare.sh
ADITYATIWARI342005 Sep 24, 2025
f56aebc
add prepare-release to makefile
ADITYATIWARI342005 Sep 24, 2025
c418a08
update the prepare.sh to removed --auto-tag feature
ADITYATIWARI342005 Sep 24, 2025
1125028
fix: restructure RELEASE.md properly; And update start.sh with the cu…
ADITYATIWARI342005 Sep 24, 2025
a10c5c0
Update scripts/release/prepare.sh
ADITYATIWARI342005 Sep 24, 2025
6670c0a
Update scripts/release/prepare.sh
ADITYATIWARI342005 Sep 24, 2025
bf85654
Update prepare.sh
ADITYATIWARI342005 Sep 24, 2025
dd35bf8
Merge branch 'main' into feature/automate-release-steps-7500
ADITYATIWARI342005 Sep 24, 2025
936cc39
Update RELEASE.md, add the bash script from start.sh to release.md
ADITYATIWARI342005 Sep 28, 2025
28b09de
Update start.sh, remove bash script
ADITYATIWARI342005 Sep 28, 2025
e6f6f2a
Merge branch 'main' into feature/automate-release-steps-7500
ADITYATIWARI342005 Sep 28, 2025
17708d1
Update scripts/release/prepare.sh
ADITYATIWARI342005 Sep 28, 2025
949ae12
feat: automate release steps with changelog, UI upgrade, and tag crea…
ADITYATIWARI342005 Sep 28, 2025
b424cd6
fix logic in prepare.sh
ADITYATIWARI342005 Sep 28, 2025
7eb57a8
Delete scripts/release/utils.sh
ADITYATIWARI342005 Sep 28, 2025
8512f26
Update Makefile, remove makefile target for prepare-release as instru…
ADITYATIWARI342005 Sep 28, 2025
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
78 changes: 46 additions & 32 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,18 @@ Create an issue with the checklist for the release by running `bash scripts/rele

<!-- BEGIN_CHECKLIST -->

1. Create a PR "Prepare release 1.x.x / 2.x.x" against main or maintenance branch ([example](https://github.com/jaegertracing/jaeger/pull/6826)) by updating CHANGELOG.md to include:
* A new section with the header `1.x.x / 2.x.x (YYYY-MM-DD)` (copy the template at the top)
* A curated list of notable changes and links to PRs. Do not simply dump git log, select the changes that affect the users.
To obtain the list of all changes run `make changelog`.
* The section can be split into sub-section if necessary, e.g. UI Changes, Backend Changes, Bug Fixes, etc.
* Then upgrade the submodule versions and finally commit. For example:
```
git submodule init
git submodule update
pushd jaeger-ui
git checkout main
git pull
git checkout {new_ui_version} # e.g. v1.5.0
popd
```
* If there are only dependency bumps, indicate this with "Dependencies upgrades only" ([example](https://github.com/jaegertracing/jaeger-ui/pull/2431/files)).
* If there are no changes, indicate this with "No changes" ([example](https://github.com/jaegertracing/jaeger/pull/4131/files)).
* Rotate the below release managers table placing yourself at the bottom. The date should be the first Wednesday of the month.
* Add label `changelog:skip` to the pull request.
1. Create a PR "Prepare release 1.x.x / 2.x.x" against main or maintenance branch ([example](https://github.com/jaegertracing/jaeger/pull/6826)):
* **Automated option**:
- First, create a tracking issue: `bash scripts/release/start.sh`
- Then, create the PR: `bash ./scripts/release/prepare.sh v1.x.x v2.x.x`
* **Manual option**: Follow the [manual release preparation steps](#manual-release-preparation-steps) below
2. After the PR is merged, create new release tags:
```
git checkout main
git pull
git tag v1... -s # use the new version
git tag v2... -s # use the new version
git push upstream v1... v2...
git pull --ff-only upstream main
git tag v1.x.x -s -m "Release v1.x.x"
git tag v2.x.x -s -m "Release v2.x.x"
git push upstream v1.x.x v2.x.x
```
3. Create a release on Github:
* Automated:
Expand All @@ -54,15 +40,14 @@ Create an issue with the checklist for the release by running `bash scripts/rele

## Manual release

* Manual:
* Title "Release 1.x.x / 2.x.x"
* Tag `v1.x.x` (note the `v` prefix) and choose appropriate branch (usually `main`)
* Copy the new CHANGELOG.md section into the release notes
* Extra: GitHub has a button "generate release notes". Those are not formatted as we want,
but it has a nice feature of explicitly listing first-time contributors.
Before doing the previous step, you can click that button and then remove everything
except the New Contributors section. Change the header to `### 👏 New Contributors`,
then copy the main changelog above it. [Example](https://github.com/jaegertracing/jaeger/releases/tag/v1.55.0).
* Title "Release 1.x.x / 2.x.x"
* Tag `v1.x.x` (note the `v` prefix) and choose appropriate branch (usually `main`)
* Copy the new CHANGELOG.md section into the release notes
* Extra: GitHub has a button "generate release notes". Those are not formatted as we want,
but it has a nice feature of explicitly listing first-time contributors.
Before doing the previous step, you can click that button and then remove everything
except the New Contributors section. Change the header to `### 👏 New Contributors`,
then copy the main changelog above it. [Example](https://github.com/jaegertracing/jaeger/releases/tag/v1.55.0).

## Patch Release

Expand All @@ -78,6 +63,35 @@ Maintenance branches should follow naming convention: `release-major.minor` (e.g
* Once the release tag is created, the `ci-release` workflow will kick in and deploy the artifacts for the patch release.
5. Do not perform a new release of the documentation since the major.minor is not changing. The one change that may be useful is bumping the `binariesLatest` variable in the `config.toml` file ([example](https://github.com/jaegertracing/documentation/commit/eacb52f332a7e069c254e652a6b4a58ea5a07b32)).

## Manual Release Preparation Steps

If you prefer to manually create the release PR instead of using the automated script, follow these steps:

1. Update CHANGELOG.md to include:
* A new section with the header `1.x.x / 2.x.x (YYYY-MM-DD)` (copy the template at the top)
* A curated list of notable changes and links to PRs. Do not simply dump git log, select the changes that affect the users.
To obtain the list of all changes run `make changelog`.
* The section can be split into sub-section if necessary, e.g. UI Changes, Backend Changes, Bug Fixes, etc.

2. Update the UI submodule to the latest version:
```bash
git submodule init
git submodule update
pushd jaeger-ui
git checkout main
git pull
git checkout {new_ui_version} # e.g. v1.5.0
popd
```
* If there are only dependency bumps, indicate this with "Dependencies upgrades only" ([example](https://github.com/jaegertracing/jaeger-ui/pull/2431/files)).
* If there are no changes, indicate this with "No changes" ([example](https://github.com/jaegertracing/jaeger/pull/4131/files)).

3. Rotate the release managers table placing yourself at the bottom. The date should be the first Wednesday of the month.

4. Commit your changes and create a pull request.

5. Add label `changelog:skip` to the pull request.

## Release managers

A Release Manager is the person responsible for ensuring that a new version of Jaeger is released. This person will coordinate the required changes, including to the related components such as UI, IDL, and jaeger-lib and will address any problems that might happen during the release, making sure that the documentation above is correct.
Expand Down
71 changes: 71 additions & 0 deletions scripts/release/prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/bin/bash
set -e

[[ $# -ge 2 ]] || { echo "Usage: $0 v1.x.x v2.x.x [--create-tags]"; exit 1; }

v1="$1"
v2="$2"
create_tags=false

if [[ "$3" == "--create-tags" ]]; then
create_tags=true
fi

# Git operations (only skip in dry-run)
if [[ "${DRY_RUN:-}" != "true" ]]; then
if [[ "$create_tags" == "true" ]]; then
# Tag creation mode
git checkout main
git pull --ff-only upstream main
echo "About to create and push tags: $v1 and $v2"
echo "This will run:"
echo " git tag $v1 -s -m \"Release $v1\""
echo " git tag $v2 -s -m \"Release $v2\""
echo " git push upstream $v1 $v2"
echo ""
read -p "Continue? (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
git tag "$v1" -s -m "Release $v1"
git tag "$v2" -s -m "Release $v2"
git push upstream "$v1" "$v2"
echo "Tags created and pushed successfully!"
else
echo "Tag creation cancelled."
fi
else
# PR creation mode
# Generate changelog
make changelog > changelog_content.tmp

# Update CHANGELOG.md directly (no awk complexity)
current_date=$(date +"%Y-%m-%d")
echo "## $v1 / $v2 ($current_date)" > new_changelog.md
echo "" >> new_changelog.md
cat changelog_content.tmp >> new_changelog.md
echo "" >> new_changelog.md
cat CHANGELOG.md >> new_changelog.md
mv new_changelog.md CHANGELOG.md

# Update jaeger-ui submodule
git submodule update --init jaeger-ui
cd jaeger-ui
git checkout main
git pull
cd ..

git checkout -b "prepare-release-$v1-$v2"
git add CHANGELOG.md jaeger-ui
git commit -m "Prepare release $v1 / $v2"
git push origin "prepare-release-$v1-$v2"
gh pr create --title "Prepare release $v1 / $v2" --label changelog:skip
echo ""
echo "PR created successfully. After merging the PR, run:"
echo "bash ./scripts/release/prepare.sh $v1 $v2 --create-tags"
fi
else
echo "DRY RUN: Changes made locally. Would create PR for prepare-release-$v1-$v2"
fi

# Cleanup
rm -f changelog_content.tmp
42 changes: 29 additions & 13 deletions scripts/release/start.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if ! current_version_v1=$(make "echo-v1"); then
fi

# removing the v so that in the line "New version: v1.66.1", v cannot be removed with backspace
clean_version="${current_version_v1#v}"
clean_version="${current_version_v1#v}"

IFS='.' read -r major minor patch <<< "$clean_version"

Expand All @@ -41,7 +41,7 @@ if ! current_version_v2=$(make "echo-v2"); then
fi

# removing the v so that in the line "New version: v1.66.1", v cannot be removed with backspace
clean_version="${current_version_v2#v}"
clean_version="${current_version_v2#v}"

IFS='.' read -r major minor patch <<< "$clean_version"

Expand All @@ -56,22 +56,38 @@ echo "Using new version: ${new_version}"



TMPFILE=$(mktemp "/tmp/DOC_RELEASE.XXXXXX")
wget -O "$TMPFILE" https://raw.githubusercontent.com/jaegertracing/documentation/main/RELEASE.md
cmd_v1="v${user_version_v1}"
cmd_v2="v${user_version_v2}"

# Ensure the UI Release checklist is up to date.
make init-submodules
issue_body=$(cat << EOF
## Prepare Jaeger Release ${cmd_v1} / ${cmd_v2}

issue_body=$(python scripts/release/formatter.py "${TMPFILE}" "${user_version_v1}" "${user_version_v2}")
This issue tracks the release of Jaeger ${cmd_v1} / ${cmd_v2}.

**Automated option**: Run \`bash ./scripts/release/prepare.sh ${cmd_v1} ${cmd_v2}\` to automatically create the PR with changelog updates.

**Manual option**: Follow the [manual release preparation steps](https://github.com/jaegertracing/jaeger/blob/main/RELEASE.md#manual-release-preparation-steps) in \`RELEASE.md\`.

---

### Tagging

After merging the PR, create signed tags and push them:

References: #7496
EOF
)

if $dry_run; then
echo "${issue_body}"
printf "%s\n" "${issue_body}"
exit 0
else
gh issue create -R jaegertracing/jaeger --title "Prepare Jaeger Release ${new_version}" --body "$issue_body"
issue_output=$(gh issue create -R jaegertracing/jaeger --title "Prepare Jaeger Release ${new_version}" --body "$issue_body")
issue_number=$(echo "$issue_output" | grep -o '#[0-9]*' | head -1)
echo "Created tracking issue: $issue_output"
echo ""
echo "Next step: Run the following command:"
echo "bash ./scripts/release/prepare.sh ${cmd_v1} ${cmd_v2}"
fi

rm "${TMPFILE}"

exit 1;