From 458be8f787237e9b329a932a090cdb6c71efac8d Mon Sep 17 00:00:00 2001 From: Christian Haudum Date: Fri, 4 Oct 2024 08:20:48 +0200 Subject: [PATCH] chore: Update build instructions for build image Signed-off-by: Christian Haudum --- Makefile | 2 +- .../maintaining/release-loki-build-image.md | 28 ++++++------------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index f54c8ddf03dbf..87e279257dd29 100644 --- a/Makefile +++ b/Makefile @@ -664,7 +664,7 @@ else endif build-image: ensure-buildx-builder - $(SUDO) $(BUILD_OCI) --build-arg=GO_VERSION=$(GO_VERSION) -t $(IMAGE_PREFIX)/loki-build-image:$(IMAGE_TAG) ./loki-build-image + $(SUDO) $(BUILD_OCI) --build-arg=GO_VERSION=$(GO_VERSION) -t $(IMAGE_PREFIX)/loki-build-image:$(BUILD_IMAGE_VERSION) ./loki-build-image build-image-push: build-image ## push the docker build image ifneq (,$(findstring WIP,$(IMAGE_TAG))) @echo "Cannot push a WIP image, commit changes first"; \ diff --git a/docs/sources/community/maintaining/release-loki-build-image.md b/docs/sources/community/maintaining/release-loki-build-image.md index d6e1f15b1d817..45e98739324da 100644 --- a/docs/sources/community/maintaining/release-loki-build-image.md +++ b/docs/sources/community/maintaining/release-loki-build-image.md @@ -14,23 +14,11 @@ if any changes were made in the folder `./loki-build-image/`. **To build and use the `loki-build-image`:** -## Step 1 - -1. Create a branch with the desired changes to the Dockerfile. -2. Update the version tag of the `loki-build-image` pipeline defined in `.drone/drone.jsonnet` (search for `pipeline('loki-build-image')`) to a new version number (try to follow semver). -3. Run `DRONE_SERVER=https://drone.grafana.net/ DRONE_TOKEN= make drone` and commit the changes to the same branch. - 1. The `` is your personal drone token, which can be found by navigating to https://drone.grafana.net/account. -4. Create a PR. -5. Once approved and merged to `main`, the image with the new version is built and published. - {{% admonition type="note" %}} - Keep an eye on https://drone.grafana.net/grafana/loki for the build after merging ([example](https://drone.grafana.net/grafana/loki/17760/1/2)). - {{% /admonition %}} - -## Step 2 - -1. Create a branch. -2. Update the `BUILD_IMAGE_VERSION` variable in the `Makefile`. -3. Run `loki-build-image/version-updater.sh ` to update all the references. -4. Run `DRONE_SERVER=https://drone.grafana.net/ DRONE_TOKEN= make drone` to update the Drone config to use the new build image. -5. Create a new PR. - +1. Create a branch with the desired changes to the `./loki-build-image/Dockerfile`. +1. Update the `BUILD_IMAGE_VERSION` variable in the `Makefile`. +1. Commit your changes. +1. Run `make build-image-push` to build and publish the new version of the build image. +1. Run `make release-workflows` to update the Github workflows. +1. Commit your changes. +1. Push your changes to the remote branch. +1. Open a PR against the `main` branch.