Skip to content

Commit c7e673d

Browse files
authored
docs: explain how to update the auto-bump (#368)
1 parent 53bd96e commit c7e673d

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

.github/workflows/bump-golang-1.20.yml renamed to .github/workflows/bump-golang-previous.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: bump-golang-1.20
2+
name: bump-golang-previous
33

44
on:
55
workflow_dispatch:
@@ -16,7 +16,9 @@ jobs:
1616
- uses: actions/checkout@v3
1717
- uses: ./.github/workflows/bump-golang
1818
with:
19+
# NOTE: when a new golang version please update me with 1.<go-version-1>
1920
branch: '1.20'
21+
# NOTE: when a new golang version please update me with 1.<go-version-1>
2022
go-minor: '1.20'
2123
vaultUrl: ${{ secrets.VAULT_ADDR }}
2224
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}

.github/workflows/bump-golang.yml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- uses: ./.github/workflows/bump-golang
1818
with:
1919
branch: 'main'
20+
# NOTE: when a new golang version please update me with 1.<go-version>
2021
go-minor: '1.21'
2122
vaultUrl: ${{ secrets.VAULT_ADDR }}
2223
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}

.github/workflows/opentelemetry.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_run:
66
workflows:
77
- bump-golang-main
8-
- bump-golang-1.20
8+
- bump-golang-previous
99
types: [completed]
1010

1111
jobs:

README.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -214,19 +214,20 @@ stateDiagram-v2
214214

215215
## Releasing images for a new Go version
216216

217-
With every new version of `go` we made a new branch with the name of the previous version to allow continue building the Docker images for the previous version of `go`. So if we are in go `1.19` and go `1.20` is released, we create a new branch `1.19`, the we update the `main` branch to install go `1.20`. Due to the changes in the Debian packages repositories, there is no guaranties that the Docker images for the previous version of `go` will continue to work after some time.
217+
With every new version of `go` we made a new branch with the name of the previous version to allow us to continue building the Docker images for the previous version of `go`. So if we are in go `1.21` and go `1.22` is released, we create a new branch `1.21`, then we update the `main` branch to install go `1.22` as explained in the below steps:
218218

219+
1. Update the Go version in [.go-version](https://github.com/elastic/golang-crossbuild/blob/main/.go-version).
219220
1. Update the Docker tag in
220-
[Makefile.common](https://github.com/elastic/golang-crossbuild/blob/main/go1.10/Makefile.common#L5) and/or
221-
[Makefile.common](https://github.com/elastic/golang-crossbuild/blob/main/go1.11/Makefile.common#L5) and/or
222-
[Makefile.common](https://github.com/elastic/golang-crossbuild/blob/main/go1.12/Makefile.common#L5).
223-
1. Update the Go version and SHA256 in the
224-
[Dockerfile(s)](https://github.com/elastic/golang-crossbuild/blob/main/go1.10/base/Dockerfile#L19-L21).
225-
The SHA256 must be obtained from <https://golang.org/dl/.>
221+
[Makefile.common](https://github.com/elastic/golang-crossbuild/blob/main/go/Makefile.common#L5).
222+
1. Run `.buildkite/bump-go-release-version.sh "$(cat .go-version)"`
226223
1. Update the versions listed in this README.md.
224+
1. Update the `go-minor` value in [bump-golang.yml](https://github.com/elastic/golang-crossbuild/blob/main/github/workflows/bump-golang.yml) with the new minor go version, i.e: `1.22`.
225+
1. Update the `go-minor` and `branch` values in [bump-golang-previous.yml](https://github.com/elastic/golang-crossbuild/blob/main/github/workflows/bump-golang-previous.yml) with the old minor go version, i.e: `1.21`.
227226
1. Commit the changes. `git add -u && git commit -m 'Update to Go 1.x.y'`.
228227
1. Create a Pull Request with the description `'Update to Go 1.x.y'`.
229-
1. When merging the PR then the automation will release those docker images.
228+
1. When merging the PR, the automation will release those docker images.
229+
230+
**NOTE**: Due to the changes in the Debian packages repositories, there are no guarantees that the Docker images for the previous version of `go` will continue to work after some time.
230231

231232
## Packaging MacOS SDK
232233

0 commit comments

Comments
 (0)