From a06acd4599e1ce437e9efbc7a2f6975cca7af1eb Mon Sep 17 00:00:00 2001 From: Michel Hollands Date: Fri, 5 Apr 2024 15:10:40 +0100 Subject: [PATCH] Fix build image version Signed-off-by: Michel Hollands --- .devcontainer/devcontainer.json | 2 +- .github/workflows/check.yml | 2 +- .github/workflows/minor-release-pr.yml | 34 +++++++++++++------------- .github/workflows/patch-release-pr.yml | 32 ++++++++++++------------ clients/cmd/promtail/Dockerfile.debug | 2 +- 5 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f6fe0d371f28a..a8145a27bac7f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "grafana/loki-build-image:33.1", + "image": "grafana/loki-build-image:0.33.1", "containerEnv": { "BUILD_IN_CONTAINER": "false" }, diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9939259d24972..981839be13e6d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -2,7 +2,7 @@ "check": "uses": "grafana/loki-release/.github/workflows/check.yml@loki-2.9.x" "with": - "build_image": "grafana/loki-build-image:33.1" + "build_image": "grafana/loki-build-image:0.33.1" "golang_ci_lint_version": "v1.51.2" "release_lib_ref": "loki-2.9.x" "skip_validation": false diff --git a/.github/workflows/minor-release-pr.yml b/.github/workflows/minor-release-pr.yml index f4a7e6b6f33ab..38cc5233d65ec 100644 --- a/.github/workflows/minor-release-pr.yml +++ b/.github/workflows/minor-release-pr.yml @@ -14,7 +14,7 @@ jobs: check: uses: "grafana/loki-release/.github/workflows/check.yml@loki-2.9.x" with: - build_image: "grafana/loki-build-image:33.1" + build_image: "grafana/loki-build-image:0.33.1" golang_ci_lint_version: "v1.51.2" release_lib_ref: "loki-2.9.x" skip_validation: false @@ -89,7 +89,7 @@ jobs: --target-branch "${{ steps.extract_branch.outputs.branch }}" \ --token "${{ steps.github_app_token.outputs.token }}" \ --versioning-strategy "${{ env.VERSIONING_STRATEGY }}" - + working-directory: "lib" dist: needs: @@ -136,7 +136,7 @@ jobs: --env SKIP_ARM \ --volume .:/src/loki \ --workdir /src/loki \ - --entrypoint /bin/sh "grafana/loki-build-image:33.1" + --entrypoint /bin/sh "grafana/loki-build-image:0.33.1" git config --global --add safe.directory /src/loki echo "${NFPM_SIGNING_KEY}" > $NFPM_SIGNING_KEY_FILE make dist packages @@ -181,7 +181,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -243,7 +243,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -305,7 +305,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -369,7 +369,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -431,7 +431,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -495,7 +495,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -559,7 +559,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -623,7 +623,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -687,7 +687,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -778,16 +778,16 @@ jobs: --target-branch "${{ steps.extract_branch.outputs.branch }}" \ --token "${{ steps.github_app_token.outputs.token }}" \ --versioning-strategy "${{ env.VERSIONING_STRATEGY }}" - + cat release.json - - if [[ `jq length release.json` -gt 1 ]]; then + + if [[ `jq length release.json` -gt 1 ]]; then echo 'release-please would create more than 1 PR, so cannot determine correct version' echo "pr_created=false" >> $GITHUB_OUTPUT exit 1 fi - - if [[ `jq length release.json` -eq 0 ]]; then + + if [[ `jq length release.json` -eq 0 ]]; then echo "pr_created=false" >> $GITHUB_OUTPUT else version="$(npm run --silent get-version)" diff --git a/.github/workflows/patch-release-pr.yml b/.github/workflows/patch-release-pr.yml index 474afc8777e5d..c3a168701b9fc 100644 --- a/.github/workflows/patch-release-pr.yml +++ b/.github/workflows/patch-release-pr.yml @@ -14,7 +14,7 @@ jobs: check: uses: "grafana/loki-release/.github/workflows/check.yml@loki-2.9.x" with: - build_image: "grafana/loki-build-image:33.1" + build_image: "grafana/loki-build-image:0.33.1" golang_ci_lint_version: "v1.51.2" release_lib_ref: "loki-2.9.x" skip_validation: false @@ -89,7 +89,7 @@ jobs: --target-branch "${{ steps.extract_branch.outputs.branch }}" \ --token "${{ steps.github_app_token.outputs.token }}" \ --versioning-strategy "${{ env.VERSIONING_STRATEGY }}" - + working-directory: "lib" dist: needs: @@ -181,7 +181,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -243,7 +243,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -305,7 +305,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -369,7 +369,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -431,7 +431,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -495,7 +495,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -559,7 +559,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -623,7 +623,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -687,7 +687,7 @@ jobs: name: "parse image platform" run: | mkdir -p images - + platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")" echo "platform=${platform}" >> $GITHUB_OUTPUT echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT @@ -778,16 +778,16 @@ jobs: --target-branch "${{ steps.extract_branch.outputs.branch }}" \ --token "${{ steps.github_app_token.outputs.token }}" \ --versioning-strategy "${{ env.VERSIONING_STRATEGY }}" - + cat release.json - - if [[ `jq length release.json` -gt 1 ]]; then + + if [[ `jq length release.json` -gt 1 ]]; then echo 'release-please would create more than 1 PR, so cannot determine correct version' echo "pr_created=false" >> $GITHUB_OUTPUT exit 1 fi - - if [[ `jq length release.json` -eq 0 ]]; then + + if [[ `jq length release.json` -eq 0 ]]; then echo "pr_created=false" >> $GITHUB_OUTPUT else version="$(npm run --silent get-version)" diff --git a/clients/cmd/promtail/Dockerfile.debug b/clients/cmd/promtail/Dockerfile.debug index 0696317dac2c7..5a1acf7277b8f 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:33.1 as build +FROM grafana/loki-build-image:0.33.1 as build ARG GOARCH="amd64" COPY . /src/loki WORKDIR /src/loki