From c9523dfb560c4b15442b9f966aa862c7bd91ee47 Mon Sep 17 00:00:00 2001 From: Friedrich Gonzalez Date: Fri, 25 Nov 2022 17:54:14 +0100 Subject: [PATCH] Combine upgrade-golang-version with update the build image Signed-off-by: Friedrich Gonzalez --- docs/contributing/how-to-update-the-build-image.md | 7 +++---- docs/contributing/how-to-upgrade-golang-version.md | 9 +-------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/docs/contributing/how-to-update-the-build-image.md b/docs/contributing/how-to-update-the-build-image.md index e29990d3730..3593b2d62cd 100644 --- a/docs/contributing/how-to-update-the-build-image.md +++ b/docs/contributing/how-to-update-the-build-image.md @@ -7,10 +7,9 @@ slug: how-to-update-the-build-image The build image currently can only be updated by a Cortex maintainer. If you're not a maintainer you can still open a PR with the changes, asking a maintainer to assist you publishing the updated image. The procedure is: -1. Update `build-image/Docker`. +1. Update `build-image/Dockerfile` 1. Run `go env` and make sure `GOPROXY=https://proxy.golang.org,direct` (Go's default). Some environment may required `GOPROXY=direct`, and if you push a build image with this, build workflow on GitHub will take a lot longer to download modules. -1. Build the and publish the image by using `make push-multiarch-build-image`. This will build and push multiplatform docker image (for linux/amd64 and linux/arm64). Pushing to `quay.io/cortexproject/build-image` repository can only be done by a maintainer. Running this step successfully requires [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/), but does not require a specific platform. +1. `docker login quay.io`. Note that pushing to `quay.io/cortexproject/build-image` repository can only be done by a maintainer. +1. Build the and publish the image by using `make push-multiarch-build-image`. This will build and push multiplatform docker image (for linux/amd64 and linux/arm64). Running this step successfully requires [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/), but does not require a specific platform. 1. Replace the image tag in `.github/workflows/*` (_there may be multiple references_) and Makefile (variable `LATEST_BUILD_IMAGE_TAG`). 1. Open a PR and make sure the CI with new build-image passes - - diff --git a/docs/contributing/how-to-upgrade-golang-version.md b/docs/contributing/how-to-upgrade-golang-version.md index 9c700d5fbbd..083388ecfec 100644 --- a/docs/contributing/how-to-upgrade-golang-version.md +++ b/docs/contributing/how-to-upgrade-golang-version.md @@ -7,14 +7,7 @@ slug: how-to-upgrade-golang-version To upgrade the Golang version: -1. Upgrade build image version - - Upgrade Golang version in `build-image/Dockerfile` - - Build new image `make build-image/.uptodate` - - Publish the new image to `quay.io` (requires a maintainer) - - Update the Docker image tag in `.github/workflows/*` -2. Upgrade integration tests version - - Update the Golang version installed in the `integration` job in `.github/workflows/*` -3. Upgrade the reference to the latest build image called `LATEST_BUILD_IMAGE_TAG` in `Makefile` +1. Upgrade build image version with golang version as describe [here](./how-to-update-the-build-image.md) If the minimum support Golang version should be upgraded as well: