From 8e11cd7a8222a64d60bff30a41e399ddbda3372e Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Tue, 27 Feb 2024 16:43:35 -0700 Subject: [PATCH] fix: image tag from env and pin release to v1.11.5 (#12073) --- .github/jsonnetfile.json | 2 +- .github/jsonnetfile.lock.json | 4 ++-- .github/release-workflows.jsonnet | 6 +++++- .../github.com/grafana/loki-release/workflows/main.jsonnet | 6 +++++- .github/workflows/minor-release-pr.yml | 6 +++--- .github/workflows/patch-release-pr.yml | 6 +++--- .github/workflows/release.yml | 7 +++++-- Makefile | 2 +- 8 files changed, 25 insertions(+), 14 deletions(-) diff --git a/.github/jsonnetfile.json b/.github/jsonnetfile.json index d55fccd7afdc6..7b19ed138f99e 100644 --- a/.github/jsonnetfile.json +++ b/.github/jsonnetfile.json @@ -8,7 +8,7 @@ "subdir": "workflows" } }, - "version": "release-1.11.x" + "version": "v1.11.5" } ], "legacyImports": true diff --git a/.github/jsonnetfile.lock.json b/.github/jsonnetfile.lock.json index 8e2b9fb4b49b2..840c06de3d460 100644 --- a/.github/jsonnetfile.lock.json +++ b/.github/jsonnetfile.lock.json @@ -8,8 +8,8 @@ "subdir": "workflows" } }, - "version": "e5f369532d30a4f83e3abdd1f58bd52a4871a419", - "sum": "n2lxvnkcGKkH7iTFRRBzjPGZGOaMNZvFhdr2abEqhs0=" + "version": "09374df9ca39fa58ec93d9e3fad4da1593186039", + "sum": "eMlN1tvu1jxKTdWvNfmXESn7JI+Wfu2C1wCabo7P2VQ=" } ], "legacyImports": false diff --git a/.github/release-workflows.jsonnet b/.github/release-workflows.jsonnet index 5b7064b71f4e4..94022179650e0 100644 --- a/.github/release-workflows.jsonnet +++ b/.github/release-workflows.jsonnet @@ -1,7 +1,11 @@ local lokiRelease = import 'workflows/main.jsonnet'; local build = lokiRelease.build; -local releaseLibRef = 'release-1.11.x'; +local releaseLibRef = std.filter( + function(dep) dep.source.git.remote == 'https://github.com/grafana/loki-release.git', + (import 'jsonnetfile.json').dependencies +)[0].version; + local checkTemplate = 'grafana/loki-release/.github/workflows/check.yml@%s' % releaseLibRef; local imageJobs = { diff --git a/.github/vendor/github.com/grafana/loki-release/workflows/main.jsonnet b/.github/vendor/github.com/grafana/loki-release/workflows/main.jsonnet index 143fb22ef3dc5..0f676c63f1fb4 100644 --- a/.github/vendor/github.com/grafana/loki-release/workflows/main.jsonnet +++ b/.github/vendor/github.com/grafana/loki-release/workflows/main.jsonnet @@ -75,7 +75,11 @@ branches: branches, }, }, - permissions: 'write-all', + permissions: { + contents: 'write', + 'pull-requests': 'write', + 'id-token': 'write', + }, concurrency: { group: 'create-release-${{ github.sha }}', }, diff --git a/.github/workflows/minor-release-pr.yml b/.github/workflows/minor-release-pr.yml index f23b8648e9dfd..baa5ab072f4eb 100644 --- a/.github/workflows/minor-release-pr.yml +++ b/.github/workflows/minor-release-pr.yml @@ -3,18 +3,18 @@ concurrency: env: DOCKER_USERNAME: "grafana" IMAGE_PREFIX: "grafana" - RELEASE_LIB_REF: "release-1.11.x" + RELEASE_LIB_REF: "v1.11.5" RELEASE_REPO: "grafana/loki" SKIP_VALIDATION: false USE_GITHUB_APP_TOKEN: true VERSIONING_STRATEGY: "always-bump-minor" jobs: check: - uses: "grafana/loki-release/.github/workflows/check.yml@release-1.11.x" + uses: "grafana/loki-release/.github/workflows/check.yml@v1.11.5" with: build_image: "grafana/loki-build-image:0.29.3-go1.20.10" golang_ci_lint_version: "v1.51.2" - release_lib_ref: "release-1.11.x" + release_lib_ref: "v1.11.5" skip_validation: false use_github_app_token: true create-release-pr: diff --git a/.github/workflows/patch-release-pr.yml b/.github/workflows/patch-release-pr.yml index 5ae8209847fc7..a4acc30107453 100644 --- a/.github/workflows/patch-release-pr.yml +++ b/.github/workflows/patch-release-pr.yml @@ -3,18 +3,18 @@ concurrency: env: DOCKER_USERNAME: "grafana" IMAGE_PREFIX: "grafana" - RELEASE_LIB_REF: "release-1.11.x" + RELEASE_LIB_REF: "v1.11.5" RELEASE_REPO: "grafana/loki" SKIP_VALIDATION: false USE_GITHUB_APP_TOKEN: true VERSIONING_STRATEGY: "always-bump-patch" jobs: check: - uses: "grafana/loki-release/.github/workflows/check.yml@release-1.11.x" + uses: "grafana/loki-release/.github/workflows/check.yml@v1.11.5" with: build_image: "grafana/loki-build-image:0.29.3-go1.20.10" golang_ci_lint_version: "v1.51.2" - release_lib_ref: "release-1.11.x" + release_lib_ref: "v1.11.5" skip_validation: false use_github_app_token: true create-release-pr: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 45ed792a5cdfa..9260cc8936d19 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ concurrency: group: "create-release-${{ github.sha }}" env: IMAGE_PREFIX: "grafana" - RELEASE_LIB_REF: "release-1.11.x" + RELEASE_LIB_REF: "v1.11.5" RELEASE_REPO: "grafana/loki" USE_GITHUB_APP_TOKEN: false jobs: @@ -201,4 +201,7 @@ name: "create release" branches: - "release-[0-9]+.[0-9]+.x" - "k[0-9]+" -permissions: "write-all" +permissions: + contents: "write" + id-token: "write" + pull-requests: "write" diff --git a/Makefile b/Makefile index bb520855a0ffd..b4df042f74710 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ BUILD_IMAGE_VERSION := 0.29.3-go1.20.10 # Docker image info IMAGE_PREFIX ?= grafana -IMAGE_TAG := $(shell ./tools/image-tag) +IMAGE_TAG ?= $(shell ./tools/image-tag) # Version info for binaries GIT_REVISION := $(shell git rev-parse --short HEAD)