From 1e143ace11ed042eff7433df481ee3d96b855f4a Mon Sep 17 00:00:00 2001 From: Michel Hollands <42814411+MichelHollands@users.noreply.github.com> Date: Tue, 10 Jan 2023 16:34:40 +0000 Subject: [PATCH] Use new build image everywhere (#8063) Use the latest build image everywhere. Signed-off-by: Michel Hollands --- .drone/drone.jsonnet | 2 +- .drone/drone.yml | 6 +++--- clients/cmd/docker-driver/Dockerfile | 2 +- clients/cmd/promtail/Dockerfile.cross | 2 +- clients/cmd/promtail/Dockerfile.debug | 2 +- cmd/loki-canary/Dockerfile.cross | 2 +- cmd/loki/Dockerfile.cross | 2 +- cmd/loki/Dockerfile.debug | 2 +- cmd/querytee/Dockerfile.cross | 2 +- loki-build-image/version-updater.sh | 15 ++++++++++++--- operator/Dockerfile.cross | 2 +- 11 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.drone/drone.jsonnet b/.drone/drone.jsonnet index 8fbab4dbfc..f569584e3a 100644 --- a/.drone/drone.jsonnet +++ b/.drone/drone.jsonnet @@ -446,7 +446,7 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') { [ pipeline('loki-build-image') { - local build_image_tag = '0.25.0', + local build_image_tag = '0.26.0', workspace: { base: '/src', path: 'loki', diff --git a/.drone/drone.yml b/.drone/drone.yml index 9d969d152c..16a395face 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -10,7 +10,7 @@ steps: dry_run: true repo: grafana/loki-build-image tags: - - 0.25.0 + - 0.26.0 when: event: - pull_request @@ -26,7 +26,7 @@ steps: from_secret: docker_password repo: grafana/loki-build-image tags: - - 0.25.0 + - 0.26.0 username: from_secret: docker_username when: @@ -1633,6 +1633,6 @@ kind: secret name: gpg_private_key --- kind: signature -hmac: b07d95d16c5f0170c2f5c16a7b73a73b5c3989b531bf4a79e8487166cc8bf77b +hmac: 62f0aea10366a3c443c26cdc0b088eae7825d731a8651165148b2c102c1ffc93 ... diff --git a/clients/cmd/docker-driver/Dockerfile b/clients/cmd/docker-driver/Dockerfile index 3714960c91..083ea483d3 100644 --- a/clients/cmd/docker-driver/Dockerfile +++ b/clients/cmd/docker-driver/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILD_IMAGE=grafana/loki-build-image:0.25.0 +ARG BUILD_IMAGE=grafana/loki-build-image:0.26.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/loki -f cmd/loki/Dockerfile . diff --git a/clients/cmd/promtail/Dockerfile.cross b/clients/cmd/promtail/Dockerfile.cross index eb58c9965a..b518c63742 100644 --- a/clients/cmd/promtail/Dockerfile.cross +++ b/clients/cmd/promtail/Dockerfile.cross @@ -1,4 +1,4 @@ -ARG BUILD_IMAGE=grafana/loki-build-image:0.25.0 +ARG BUILD_IMAGE=grafana/loki-build-image:0.26.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/promtail -f clients/cmd/promtail/Dockerfile . diff --git a/clients/cmd/promtail/Dockerfile.debug b/clients/cmd/promtail/Dockerfile.debug index 19acecf687..8e128dff62 100644 --- a/clients/cmd/promtail/Dockerfile.debug +++ b/clients/cmd/promtail/Dockerfile.debug @@ -2,7 +2,7 @@ # This file is intended to be called from the root like so: # docker build -t grafana/promtail -f clients/cmd/promtail/Dockerfile.debug . -FROM grafana/loki-build-image:0.25.0 as build +FROM grafana/loki-build-image:0.26.0 as build ARG GOARCH="amd64" COPY . /src/loki WORKDIR /src/loki diff --git a/cmd/loki-canary/Dockerfile.cross b/cmd/loki-canary/Dockerfile.cross index 7714f59b47..48f3d4a945 100644 --- a/cmd/loki-canary/Dockerfile.cross +++ b/cmd/loki-canary/Dockerfile.cross @@ -1,4 +1,4 @@ -ARG BUILD_IMAGE=grafana/loki-build-image:0.25.0 +ARG BUILD_IMAGE=grafana/loki-build-image:0.26.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/promtail -f cmd/promtail/Dockerfile . diff --git a/cmd/loki/Dockerfile.cross b/cmd/loki/Dockerfile.cross index 76af547cc3..be6dbfa837 100644 --- a/cmd/loki/Dockerfile.cross +++ b/cmd/loki/Dockerfile.cross @@ -1,4 +1,4 @@ -ARG BUILD_IMAGE=grafana/loki-build-image:0.25.0 +ARG BUILD_IMAGE=grafana/loki-build-image:0.26.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/loki -f cmd/loki/Dockerfile . diff --git a/cmd/loki/Dockerfile.debug b/cmd/loki/Dockerfile.debug index 4d0983d38e..a477b93441 100644 --- a/cmd/loki/Dockerfile.debug +++ b/cmd/loki/Dockerfile.debug @@ -1,7 +1,7 @@ # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/loki -f cmd/loki/Dockerfile.debug . -FROM grafana/loki-build-image:0.25.0 as build +FROM grafana/loki-build-image:0.26.0 as build ARG GOARCH="amd64" COPY . /src/loki WORKDIR /src/loki diff --git a/cmd/querytee/Dockerfile.cross b/cmd/querytee/Dockerfile.cross index 635d5ca27e..83b8bcdd9f 100644 --- a/cmd/querytee/Dockerfile.cross +++ b/cmd/querytee/Dockerfile.cross @@ -1,4 +1,4 @@ -ARG BUILD_IMAGE=grafana/loki-build-image:0.25.0 +ARG BUILD_IMAGE=grafana/loki-build-image:0.26.0 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/promtail -f cmd/promtail/Dockerfile . diff --git a/loki-build-image/version-updater.sh b/loki-build-image/version-updater.sh index 66c58c61ad..75203c34a1 100755 --- a/loki-build-image/version-updater.sh +++ b/loki-build-image/version-updater.sh @@ -2,6 +2,15 @@ set -euo pipefail +# The BSD version of the sed command in MacOS doesn't work with this script. +# Please install gnu-sed via `brew install gnu-sed`. +# The gsed command becomes available then. +SED="sed" +if command -v gsed &> /dev/null ; then + echo "Using gsed" + SED="gsed" +fi + VERSION="${1-}" if [[ -z "${VERSION}" ]]; then >&2 echo "Usage: $0 " @@ -10,8 +19,8 @@ fi echo "Updating loki-build-image references to '${VERSION}'" -find . -type f \( -name '*.yml' -o -name '*.yaml' -o -name '*Dockerfile*' \) -exec grep -lP "grafana/loki-build-image:[0-9]+" {} \; | grep -ve '.drone' | +find . -type f \( -name '*.yml' -o -name '*.yaml' -o -name '*Dockerfile*' \) -exec grep -lE "grafana/loki-build-image:[0-9]+" {} \; | grep -ve '.drone' | while read -r x; do echo "Updating ${x}" - sed -i -re "s,grafana/loki-build-image:[0-9]+\.[0-9]+\.[0-9]+,grafana/loki-build-image:${VERSION},g" "${x}" - done \ No newline at end of file + ${SED} -i -re "s,grafana/loki-build-image:[0-9]+\.[0-9]+\.[0-9]+,grafana/loki-build-image:${VERSION},g" "${x}" + done diff --git a/operator/Dockerfile.cross b/operator/Dockerfile.cross index a524e31728..84832ad1a7 100644 --- a/operator/Dockerfile.cross +++ b/operator/Dockerfile.cross @@ -1,4 +1,4 @@ -ARG BUILD_IMAGE=grafana/loki-build-image:0.25.0 +ARG BUILD_IMAGE=grafana/loki-build-image:0.26.0 FROM golang:1.19.1-alpine as goenv RUN go env GOARCH > /goarch && \