Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(release-minor): add apm- prefix and create release diff between patches #13065

Merged
merged 6 commits into from
May 7, 2024

Conversation

v1v
Copy link
Member

@v1v v1v commented May 2, 2024

Motivation/summary

Support release automation for FF with:

  • adding apm- prefix to Asciidoc links and targets
  • using tags instead of branches in compare links

Test

$  make rename-changelog RELEASE_BRANCH=8.15 RELEASE_VERSION=8.15.0 VERSION=8.15
>> common-changelog
>> rename-changelog

produced:

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 623bc75af..dffd289c9 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -1,4 +1,5 @@
 // tag::list[]
+* <<apm-release-notes-8.15>>
 * <<apm-release-notes-8.14>>
 * <<apm-release-notes-8.13>>
 * <<apm-release-notes-8.12>>
@@ -18,6 +19,7 @@
 
 // tag::includes[]
 include::./changelogs/head.asciidoc[]
+include::./changelogs/8.15.asciidoc[]
 include::./changelogs/8.14.asciidoc[]
 include::./changelogs/8.13.asciidoc[]
 include::./changelogs/8.12.asciidoc[]
diff --git a/changelogs/head.asciidoc b/changelogs/head.asciidoc
index a3cf1bf26..52107f228 100644
--- a/changelogs/head.asciidoc
+++ b/changelogs/head.asciidoc
@@ -1,7 +1,7 @@
 [[release-notes-head]]
 == APM version HEAD
 
-https://github.com/elastic/apm-server/compare/8.14\...main[View commits]
+https://github.com/elastic/apm-server/compare/8.15\...main[View commits]
 
 [float]
 ==== Breaking Changes

and

[[apm-release-notes-8.15]]
== APM version 8.15
* <<apm-release-notes-8.15.0>>

[float]
[[apm-release-notes-8.15.0]]
=== APM version 8.15.0

https://github.com/elastic/apm-server/compare/v8.13.2\...v8.15.0[View commits]

[float]
==== Breaking Changes

[float]
==== Deprecations

[float]
==== Intake API Changes

[float]
==== Added

Checklist

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

Related issues

Behaviour changed in #12820

Part of #12989

@v1v v1v added the backport-8.14 Automated backport with mergify label May 2, 2024
@v1v v1v self-assigned this May 2, 2024
@v1v v1v changed the title ci(release-minor): add apm- prefix to Asciidoc links and targets ci(release-minor): add apm- prefix and create release diff between patches May 2, 2024
release.mk Outdated Show resolved Hide resolved
@@ -39,7 +39,7 @@ PROJECT_PATCH_VERSION ?= $(shell echo $(RELEASE_VERSION) | cut -f3 -d.)
PROJECT_OWNER ?= elastic
RELEASE_TYPE ?= minor

CURRENT_RELEASE ?= $(shell gh api repos/elastic/apm-server/releases/latest | jq -r '.tag_name|sub("v"; ""; "")')
CURRENT_RELEASE ?= $(shell gh release list --exclude-drafts --exclude-pre-releases --limit 10 --json tagName --jq '.[].tagName|select(. | startswith("v$(PROJECT_MAJOR_VERSION)"))' | sed 's|v||g' | sort -r | head -n 1)
Copy link
Member Author

@v1v v1v May 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot use latest as long as latest can point to 7.17. I've already reported to the release team (Only accessible by Elastic employees)

image

I decided to use a different approach and filter by the major version and do some manipulation

@v1v v1v requested a review from a team May 2, 2024 08:53
@v1v v1v added backport-7.17 Automated backport with mergify to the 7.17 branch backport-8.13 Automated backport with mergify labels May 2, 2024
@v1v v1v marked this pull request as ready for review May 2, 2024 08:54
@v1v v1v requested a review from a team as a code owner May 2, 2024 08:54
awk "NR==5{print \"\n* <<release-notes-$(VERSION).0>>\n\n[float]\n[[release-notes-$(VERSION).0]]\n=== APM version $(VERSION).0\"}1" changelogs/$(VERSION).asciidoc > changelogs/$(VERSION).asciidoc.new
mv changelogs/$(VERSION).asciidoc.new changelogs/$(VERSION).asciidoc
echo "$$CHANGELOG_MINOR_TMPL" > changelogs/$(VERSION).asciidoc
tail -n +6 changelogs/head.asciidoc >> changelogs/$(VERSION).asciidoc
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as long as head.asciidoc uses the current format, we can use this approach, so less craziness commands to manipulate the file but using templates

@v1v v1v enabled auto-merge (squash) May 7, 2024 11:04
@v1v v1v merged commit 1f2c64e into elastic:main May 7, 2024
9 checks passed
mergify bot pushed a commit that referenced this pull request May 7, 2024
…patches (#13065)

(cherry picked from commit 1f2c64e)

# Conflicts:
#	release.mk
mergify bot pushed a commit that referenced this pull request May 7, 2024
mergify bot pushed a commit that referenced this pull request May 7, 2024
mergify bot added a commit that referenced this pull request May 7, 2024
…patches (#13065) (#13088)

(cherry picked from commit 1f2c64e)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
mergify bot added a commit that referenced this pull request May 7, 2024
…patches (#13065) (#13089)

(cherry picked from commit 1f2c64e)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
mergify bot added a commit that referenced this pull request May 7, 2024
…etween patches (backport #13065) (#13087)

* ci(release-minor): add `apm-` prefix and create release diff between patches (#13065)

(cherry picked from commit 1f2c64e)

# Conflicts:
#	release.mk

* Update release.mk

---------

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.17 Automated backport with mergify to the 7.17 branch backport-8.13 Automated backport with mergify backport-8.14 Automated backport with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants