diff --git a/.github/release-workflows.jsonnet b/.github/release-workflows.jsonnet index ac30d3cea94ee..1dc1eb96a8d91 100644 --- a/.github/release-workflows.jsonnet +++ b/.github/release-workflows.jsonnet @@ -119,37 +119,36 @@ local weeklyImageJobs = { contents: 'write', 'pull-requests': 'write', }, - // Disable for faster testing - // jobs: { - // check: { - // uses: checkTemplate, - // with: { - // build_image: buildImage, - // golang_ci_lint_version: golangCiLintVersion, - // release_lib_ref: releaseLibRef, - // skip_validation: false, - // use_github_app_token: true, - // }, - // }, - // } + { jobs: { + check: { + uses: checkTemplate, + with: { + build_image: buildImage, + golang_ci_lint_version: golangCiLintVersion, + release_lib_ref: releaseLibRef, + skip_validation: false, + use_github_app_token: true, + }, + }, + } + { ['%s-image' % name]: weeklyImageJobs[name] - // + lokiRelease.job.withNeeds(['check']) - { - env: { - BUILD_TIMEOUT: imageBuildTimeoutMin, - RELEASE_REPO: 'grafana/loki', - RELEASE_LIB_REF: releaseLibRef, - IMAGE_PREFIX: imagePrefix, - GO_VERSION: goVersion, - }, - } + + job.withNeeds(['check']) + + job.withEnv({ + BUILD_TIMEOUT: imageBuildTimeoutMin, + RELEASE_REPO: 'grafana/loki', + RELEASE_LIB_REF: releaseLibRef, + IMAGE_PREFIX: imagePrefix, + GO_VERSION: goVersion, + }) for name in std.objectFields(weeklyImageJobs) } + { ['%s-manifest' % name]: job.new() + job.withNeeds(['%s-image' % name]) + + job.withEnv({ + BUILD_TIMEOUT: imageBuildTimeoutMin, + }) + job.withSteps([ step.new('Set up Docker buildx', 'docker/setup-buildx-action@v3'), step.new('Login to DockerHub (from Vault)', 'grafana/shared-workflows/actions/dockerhub-login@main'), @@ -168,11 +167,6 @@ local weeklyImageJobs = { docker buildx imagetools inspect $IMAGE ||| % { name: '%s-image' % name }), ]) - + { - env: { - BUILD_TIMEOUT: imageBuildTimeoutMin, - }, - } for name in std.objectFields(weeklyImageJobs) }, }), diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index 09e6afe8ed984..8ba365d6e9696 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -1,4 +1,12 @@ "jobs": + "check": + "uses": "grafana/loki-release/.github/workflows/check.yml@main" + "with": + "build_image": "grafana/loki-build-image:0.34.4" + "golang_ci_lint_version": "v1.60.3" + "release_lib_ref": "main" + "skip_validation": false + "use_github_app_token": true "loki-canary-boringcrypto-image": "env": "BUILD_TIMEOUT": 60 @@ -6,6 +14,8 @@ "IMAGE_PREFIX": "grafana" "RELEASE_LIB_REF": "main" "RELEASE_REPO": "grafana/loki" + "needs": + - "check" "outputs": "image_digest_linux_amd64": "${{ steps.digest.outputs.digest_linux_amd64 }}" "image_digest_linux_arm": "${{ steps.digest.outputs.digest_linux_arm }}" @@ -112,6 +122,8 @@ "IMAGE_PREFIX": "grafana" "RELEASE_LIB_REF": "main" "RELEASE_REPO": "grafana/loki" + "needs": + - "check" "outputs": "image_digest_linux_amd64": "${{ steps.digest.outputs.digest_linux_amd64 }}" "image_digest_linux_arm": "${{ steps.digest.outputs.digest_linux_arm }}" @@ -218,6 +230,8 @@ "IMAGE_PREFIX": "grafana" "RELEASE_LIB_REF": "main" "RELEASE_REPO": "grafana/loki" + "needs": + - "check" "outputs": "image_digest_linux_amd64": "${{ steps.digest.outputs.digest_linux_amd64 }}" "image_digest_linux_arm": "${{ steps.digest.outputs.digest_linux_arm }}" @@ -324,6 +338,8 @@ "IMAGE_PREFIX": "grafana" "RELEASE_LIB_REF": "main" "RELEASE_REPO": "grafana/loki" + "needs": + - "check" "outputs": "image_digest_linux_amd64": "${{ steps.digest.outputs.digest_linux_amd64 }}" "image_digest_linux_arm": "${{ steps.digest.outputs.digest_linux_arm }}"