diff --git a/.github/release-workflows.jsonnet b/.github/release-workflows.jsonnet index cef76ba0563d3..1d3f2aa6dcf92 100644 --- a/.github/release-workflows.jsonnet +++ b/.github/release-workflows.jsonnet @@ -2,11 +2,7 @@ local lokiRelease = import 'workflows/main.jsonnet'; local build = lokiRelease.build; local job = lokiRelease.job; -local releaseLibRef = std.filter( - function(dep) dep.source.git.remote == 'https://github.com/grafana/loki-release.git', - (import 'jsonnetfile.json').dependencies -)[0].version; - +local releaseLibRef = "release-1.12.x"; local checkTemplate = 'grafana/loki-release/.github/workflows/check.yml@%s' % releaseLibRef; local imageJobs = { diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 084c8638f5c17..b9a0adc1aeddd 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,10 +1,10 @@ "jobs": "check": - "uses": "grafana/loki-release/.github/workflows/check.yml@loki-2.9.x" + "uses": "grafana/loki-release/.github/workflows/check.yml@release-1.12.x" "with": - "build_image": "grafana/loki-build-image:0.33.1" - "golang_ci_lint_version": "v1.55.1" - "release_lib_ref": "loki-2.9.x" + "build_image": "grafana/loki-build-image:0.30.1" + "golang_ci_lint_version": "v1.51.2" + "release_lib_ref": "release-1.12.x" "skip_validation": false "use_github_app_token": true "name": "check" diff --git a/.github/workflows/minor-release-pr.yml b/.github/workflows/minor-release-pr.yml index 3a05f63e1ada8..c3f21b35d5792 100644 --- a/.github/workflows/minor-release-pr.yml +++ b/.github/workflows/minor-release-pr.yml @@ -5,18 +5,18 @@ env: CHANGELOG_PATH: "CHANGELOG.md" DOCKER_USERNAME: "grafana" IMAGE_PREFIX: "grafana" - RELEASE_LIB_REF: "loki-2.9.x" + RELEASE_LIB_REF: "release-1.12.x" 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@loki-2.9.x" + uses: "grafana/loki-release/.github/workflows/check.yml@release-1.12.x" with: - build_image: "grafana/loki-build-image:0.33.1" - golang_ci_lint_version: "v1.55.1" - release_lib_ref: "loki-2.9.x" + build_image: "grafana/loki-build-image:0.30.1" + golang_ci_lint_version: "v1.51.2" + release_lib_ref: "release-1.12.x" skip_validation: false use_github_app_token: true create-release-pr: @@ -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:0.33.1" + --entrypoint /bin/sh "grafana/loki-build-image:0.30.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 3d67b37398c98..8f79316865bad 100644 --- a/.github/workflows/patch-release-pr.yml +++ b/.github/workflows/patch-release-pr.yml @@ -5,18 +5,18 @@ env: CHANGELOG_PATH: "CHANGELOG.md" DOCKER_USERNAME: "grafana" IMAGE_PREFIX: "grafana" - RELEASE_LIB_REF: "loki-2.9.x" + RELEASE_LIB_REF: "release-1.12.x" 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@loki-2.9.x" + uses: "grafana/loki-release/.github/workflows/check.yml@release-1.12.x" with: - build_image: "grafana/loki-build-image:0.33.1" - golang_ci_lint_version: "v1.55.1" - release_lib_ref: "loki-2.9.x" + build_image: "grafana/loki-build-image:0.30.1" + golang_ci_lint_version: "v1.51.2" + release_lib_ref: "release-1.12.x" skip_validation: false use_github_app_token: true create-release-pr: @@ -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:0.33.1" + --entrypoint /bin/sh "grafana/loki-build-image:0.30.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/release.yml b/.github/workflows/release.yml index 9303c31f6ddcb..b00dd63ec566a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ concurrency: env: IMAGE_PREFIX: "grafana" PUBLISH_TO_GCS: false - RELEASE_LIB_REF: "loki-2.9.x" + RELEASE_LIB_REF: "release-1.12.x" RELEASE_REPO: "grafana/loki" USE_GITHUB_APP_TOKEN: false jobs: