Skip to content

Commit c1b5789

Browse files
authored
release: Update releasing doc (#501)
Updates the `RELEASE.md` doc with the latest information on how to ship a new version of `ecctl`. Signed-off-by: Marc Lopez Rubio <marc5.12@outlook.com>
1 parent db080f4 commit c1b5789

File tree

2 files changed

+31
-11
lines changed

2 files changed

+31
-11
lines changed

build/Makefile.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,6 @@ changelog:
5757
## Generates a snapshot of the potential release
5858
snapshot: deps
5959
@ $(GOBIN)/goreleaser release --rm-dist --snapshot --skip-validate
60+
61+
update-cloud-sdk-go:
62+
@ go get github.com/elastic/cloud-sdk-go@$(VERSION)

developer_docs/RELEASE.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,71 @@
11
# Releasing a new version
22

3-
This guide aims to provide guidance on how to release new versions of the `ecctl` binary as well as updating all the necessary parts to make it successful.
3+
This guide aims to provide guidance on how to release new versions of the `ecctl` binary as well as updating all the necessary parts to make it successful. The release will happen automatically via GitHub actions, but there are a few prerequisites to tick before that can be started.
4+
5+
- [Releasing a new version](#releasing-a-new-version)
6+
- [Prerequisites](#prerequisites)
7+
- [Verify a release in `cloud-sdk-go` has been made](#verify-a-release-in-cloud-sdk-go-has-been-made)
8+
- [Make sure the version has been updated](#make-sure-the-version-has-been-updated)
9+
- [Generating a changelog for the new version](#generating-a-changelog-for-the-new-version)
10+
- [Executing the release](#executing-the-release)
11+
- [Post release requirements](#post-release-requirements)
12+
- [Approve the updated `homebrew-tap` formula.](#approve-the-updated-homebrew-tap-formula)
13+
- [Create documentation specific to the release (Minor and Major only)](#create-documentation-specific-to-the-release-minor-and-major-only)
14+
- [Update downloads website](#update-downloads-website)
415

516
## Prerequisites
617

718
Before starting any release, make sure to open a release checklist [issue](https://github.com/elastic/ecctl/issues/403) using the provided release [template](https://github.com/elastic/ecctl/issues/new?assignees=&labels=Team%3ADelivery&template=RELEASE_CHECKLIST.md).
819

920
Releasing a new version of the binary implies that there have been changes in the source code which are meant to be released for wider consumption. Before releasing a new version there's some prerequisites that have to be checked.
1021

11-
### Verify a release in cloud-sdk-go has been made
22+
### Verify a release in `cloud-sdk-go` has been made
1223

13-
Unless this is a patch release, make sure a cloud-sdk-go release with the same version has been made.
24+
Unless this is a patch release, make sure a `cloud-sdk-go` release with the same version has been made. Once this is done, the `cloud-sdk-go` dependency should be updated to that version. To update the cloud-sdk-go dependency, please use the following command in the root of the project: `make update-cloud-sdk-go`.
1425

15-
Once this is done, the cloud-sdk-go dependency should be updated to that version.
26+
### Make sure the version has been updated
1627

17-
### Make sure the version is updated
28+
**Since the version updates are now automated via github actions, this is just a double check**
1829

1930
Since the source has changed, we need to update the current committed version to a higher version so that the release is published.
2031

21-
The version is currently defined in the [Makefile](./Makefile) as an exported environment variable called `VERSION` in the [SEMVER](https://semver.org) format: `MAJOR.MINOR.BUG`
32+
The version is currently defined in the [Makefile](./Makefile) as an exported environment variable called `VERSION` in the [SEMVER](https://semver.org) format: `MAJOR.MINOR.PATCH`
2233

2334
```Makefile
2435
SHELL := /bin/bash
2536
export VERSION ?= v1.0.0
2637
```
2738

28-
Say we want to perform a minor version release (i.e. no breaking changes and only new features and bug fixes are being included); in which case we'll update the _MINOR_ part of the version:
39+
Say we want to perform a minor version release (i.e. no breaking changes and only new features and bug fixes are being included); in which case we'll update the _MINOR_ part of the version, this can be done with the `make minor` target, but it should have been updated automatically via GitHub actions.
2940

3041
```Makefile
3142
SHELL := /bin/bash
3243
export VERSION ?= v1.1.0
3344
```
3445

46+
If a patch version needs to be released, the release will be done from the minor branch. For example, if we want to release `v1.5.1`, we will check out the `1.5` branch and perform any changes in that branch. The VERSION variable in the Makefile should already be up to date, but in case it's not, it can be bumped with the `make patch` target.
47+
3548
### Generating a changelog for the new version
3649

3750
Once the version is updated, we can then generate the changelog and release notes by calling `make changelog`.
3851

39-
Take a look at one of our previous releases [`v1.0.0-beta2.adoc`](../docs/release_notes/v1.0.0-beta2.adoc) and the [template](../scripts/changelog.tpl.adoc) we use to generate them. The idea is to fill all the applicable sections so that users can consume easily.
52+
Take a look at one of our previous releases [`v1.5.0.adoc`](../docs/release_notes/v1.5.0.adoc) and the [template](../scripts/changelog.tpl.adoc) we use to generate them. The idea is to fill all the applicable sections so that users can consume easily.
4053

41-
After the release notes have been manually curated, a new pull request can be opened with the changelog, release notes and version update changes.
54+
After the release notes have been manually curated, a new pull request can be opened with the changelog and release notes.
4255

4356
## Executing the release
4457

45-
After the new changelog and version have been merged to master, the only thing remaining is to run `make release`. This is the makefile target which will push the GitHub tag and will trigger the corresponding [GitHub action](.github/workflows/release.yml) which will release ecctl.
58+
After the new changelog and version have been merged to master, the only thing remaining is to run `make tag`. This is the makefile target which will push the GitHub tag and will trigger the corresponding [GitHub action](.github/workflows/release.yml) which will release ecctl.
4659

4760
## Post release requirements
4861

4962
After a release has been performed there are still a few things we need to do.
5063

51-
### Create documentation specific to the release
64+
### Approve the updated `homebrew-tap` formula.
65+
66+
The release process will open a pull request against the [`homebrew-tap`](https://github.com/elastic/homebrew-tap/pulls) repository, which needs to be approved and merged, see <https://github.com/elastic/homebrew-tap/pull/98> as an example.
67+
68+
### Create documentation specific to the release (Minor and Major only)
5269

5370
In order to have the documentation live for our new release we need to modify the conf.yaml file in the docs repository to [add the release branch](https://github.com/elastic/docs/blob/master/conf.yaml#L837) and have the build [point to our new branch](https://github.com/elastic/docs/blob/master/conf.yaml#L836).
5471

0 commit comments

Comments
 (0)