mirror of
https://github.com/grafana/loki.git
synced 2026-03-13 09:33:58 +08:00
ci: build query-tee with weeklies (#20458)
This commit is contained in:
2
.github/jsonnetfile.json
vendored
2
.github/jsonnetfile.json
vendored
@@ -8,7 +8,7 @@
|
||||
"subdir": "workflows"
|
||||
}
|
||||
},
|
||||
"version": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
"version": "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
}
|
||||
],
|
||||
"legacyImports": true
|
||||
|
||||
2
.github/jsonnetfile.lock.json
vendored
2
.github/jsonnetfile.lock.json
vendored
@@ -8,7 +8,7 @@
|
||||
"subdir": "workflows"
|
||||
}
|
||||
},
|
||||
"version": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f",
|
||||
"version": "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc",
|
||||
"sum": "LfNl0q+23sWMu/zwsqHfbUuEfYZMNN2xpZBRizUUHHY="
|
||||
}
|
||||
],
|
||||
|
||||
1
.github/release-workflows.jsonnet
vendored
1
.github/release-workflows.jsonnet
vendored
@@ -39,6 +39,7 @@ local weeklyImageJobs = {
|
||||
'loki-canary': build.weeklyImage('loki-canary', 'cmd/loki-canary', platform=platforms.all),
|
||||
'loki-canary-boringcrypto': build.weeklyImage('loki-canary-boringcrypto', 'cmd/loki-canary-boringcrypto', platform=platforms.all),
|
||||
promtail: build.weeklyImage('promtail', 'clients/cmd/promtail', platform=platforms.all),
|
||||
querytee: build.weeklyImage('loki-query-tee', 'cmd/querytee'),
|
||||
};
|
||||
|
||||
{
|
||||
|
||||
6
.github/workflows/check.yml
vendored
6
.github/workflows/check.yml
vendored
@@ -1,10 +1,10 @@
|
||||
"jobs":
|
||||
"check":
|
||||
"uses": "grafana/loki-release/.github/workflows/check.yml@dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
"uses": "grafana/loki-release/.github/workflows/check.yml@fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
"with":
|
||||
"build_image": "grafana/loki-build-image:0.34.9"
|
||||
"golang_ci_lint_version": "v2.5.0"
|
||||
"release_lib_ref": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
"release_lib_ref": "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
"skip_validation": false
|
||||
"use_github_app_token": true
|
||||
"name": "check"
|
||||
@@ -15,4 +15,4 @@
|
||||
- "main"
|
||||
"permissions":
|
||||
"contents": "read"
|
||||
"pull-requests": "read"
|
||||
"pull-requests": "read"
|
||||
|
||||
138
.github/workflows/images.yml
vendored
138
.github/workflows/images.yml
vendored
@@ -1,10 +1,10 @@
|
||||
"jobs":
|
||||
"check":
|
||||
"uses": "grafana/loki-release/.github/workflows/check.yml@dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
"uses": "grafana/loki-release/.github/workflows/check.yml@fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
"with":
|
||||
"build_image": "grafana/loki-build-image:0.34.9"
|
||||
"golang_ci_lint_version": "v2.5.0"
|
||||
"release_lib_ref": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
"release_lib_ref": "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
"skip_validation": false
|
||||
"use_github_app_token": true
|
||||
"loki-canary-boringcrypto-image":
|
||||
@@ -12,7 +12,7 @@
|
||||
"BUILD_TIMEOUT": 60
|
||||
"GO_VERSION": "1.25.5"
|
||||
"IMAGE_PREFIX": "grafana"
|
||||
"RELEASE_LIB_REF": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
"RELEASE_LIB_REF": "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
"RELEASE_REPO": "grafana/loki"
|
||||
"needs":
|
||||
- "check"
|
||||
@@ -136,7 +136,7 @@
|
||||
"BUILD_TIMEOUT": 60
|
||||
"GO_VERSION": "1.25.5"
|
||||
"IMAGE_PREFIX": "grafana"
|
||||
"RELEASE_LIB_REF": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
"RELEASE_LIB_REF": "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
"RELEASE_REPO": "grafana/loki"
|
||||
"needs":
|
||||
- "check"
|
||||
@@ -260,7 +260,7 @@
|
||||
"BUILD_TIMEOUT": 60
|
||||
"GO_VERSION": "1.25.5"
|
||||
"IMAGE_PREFIX": "grafana"
|
||||
"RELEASE_LIB_REF": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
"RELEASE_LIB_REF": "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
"RELEASE_REPO": "grafana/loki"
|
||||
"needs":
|
||||
- "check"
|
||||
@@ -384,7 +384,7 @@
|
||||
"BUILD_TIMEOUT": 60
|
||||
"GO_VERSION": "1.25.5"
|
||||
"IMAGE_PREFIX": "grafana"
|
||||
"RELEASE_LIB_REF": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
"RELEASE_LIB_REF": "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
"RELEASE_REPO": "grafana/loki"
|
||||
"needs":
|
||||
- "check"
|
||||
@@ -503,6 +503,130 @@
|
||||
${OUTPUTS_IMAGE_NAME}@${IMAGE_DIGEST_AMD64} \
|
||||
${OUTPUTS_IMAGE_NAME}@${IMAGE_DIGEST_ARM}
|
||||
docker buildx imagetools inspect $IMAGE
|
||||
"querytee-image":
|
||||
"env":
|
||||
"BUILD_TIMEOUT": 60
|
||||
"GO_VERSION": "1.25.5"
|
||||
"IMAGE_PREFIX": "grafana"
|
||||
"RELEASE_LIB_REF": "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
"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 }}"
|
||||
"image_digest_linux_arm64": "${{ steps.digest.outputs.digest_linux_arm64 }}"
|
||||
"image_name": "${{ steps.weekly-version.outputs.image_name }}"
|
||||
"image_tag": "${{ steps.weekly-version.outputs.image_version }}"
|
||||
"permissions":
|
||||
"contents": "read"
|
||||
"id-token": "write"
|
||||
"runs-on": "${{ matrix.runs_on }}"
|
||||
"steps":
|
||||
- "name": "pull release library code"
|
||||
"uses": "actions/checkout@v4"
|
||||
"with":
|
||||
"path": "lib"
|
||||
"persist-credentials": false
|
||||
"ref": "${{ env.RELEASE_LIB_REF }}"
|
||||
"repository": "grafana/loki-release"
|
||||
- "name": "pull code to release"
|
||||
"uses": "actions/checkout@v4"
|
||||
"with":
|
||||
"path": "release"
|
||||
"persist-credentials": false
|
||||
"repository": "${{ env.RELEASE_REPO }}"
|
||||
- "name": "setup node"
|
||||
"uses": "actions/setup-node@v4"
|
||||
"with":
|
||||
"node-version": 20
|
||||
"package-manager-cache": false
|
||||
- "name": "Set up Docker buildx"
|
||||
"uses": "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2"
|
||||
- "name": "Login to DockerHub (from Vault)"
|
||||
"uses": "grafana/shared-workflows/actions/dockerhub-login@fa48192dac470ae356b3f7007229f3ac28c48a25"
|
||||
- "id": "weekly-version"
|
||||
"name": "Get weekly version"
|
||||
"run": |
|
||||
version=$(./tools/image-tag)
|
||||
echo "image_version=$version" >> $GITHUB_OUTPUT
|
||||
echo "image_name=${{ env.IMAGE_PREFIX }}/loki-query-tee" >> $GITHUB_OUTPUT
|
||||
echo "image_full_name=${{ env.IMAGE_PREFIX }}/loki-query-tee:$version" >> $GITHUB_OUTPUT
|
||||
"working-directory": "release"
|
||||
- "id": "platform"
|
||||
"name": "Parse image platform"
|
||||
"run": |
|
||||
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
|
||||
echo "platform=${platform}" >> $GITHUB_OUTPUT
|
||||
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
|
||||
"working-directory": "release"
|
||||
- "id": "build-push"
|
||||
"name": "Build and push"
|
||||
"timeout-minutes": "${{ fromJSON(env.BUILD_TIMEOUT) }}"
|
||||
"uses": "docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1"
|
||||
"with":
|
||||
"build-args": |
|
||||
IMAGE_TAG=${{ steps.weekly-version.outputs.image_version }}
|
||||
GO_VERSION=${{ env.GO_VERSION }}
|
||||
"context": "release"
|
||||
"file": "release/cmd/querytee/Dockerfile"
|
||||
"outputs": "push-by-digest=true,type=image,name=${{ steps.weekly-version.outputs.image_name }},push=true"
|
||||
"platforms": "${{ matrix.arch }}"
|
||||
"provenance": true
|
||||
"tags": "${{ steps.weekly-version.outputs.image_name }}"
|
||||
- "env":
|
||||
"OUTPUTS_DIGEST": "${{ steps.build-push.outputs.digest }}"
|
||||
"id": "digest"
|
||||
"name": "Process image digest"
|
||||
"run": |
|
||||
arch=$(echo ${{ matrix.arch }} | tr "/" "_")
|
||||
echo "digest_$arch=$OUTPUTS_DIGEST" >> $GITHUB_OUTPUT
|
||||
"working-directory": "release"
|
||||
"strategy":
|
||||
"fail-fast": true
|
||||
"matrix":
|
||||
"include":
|
||||
- "arch": "linux/amd64"
|
||||
"runs_on":
|
||||
- "github-hosted-ubuntu-x64-small"
|
||||
- "arch": "linux/arm64"
|
||||
"runs_on":
|
||||
- "github-hosted-ubuntu-arm64-small"
|
||||
- "arch": "linux/arm"
|
||||
"runs_on":
|
||||
- "github-hosted-ubuntu-arm64-small"
|
||||
"querytee-manifest":
|
||||
"env":
|
||||
"BUILD_TIMEOUT": 60
|
||||
"IMAGE_DIGEST_AMD64": "${{ needs.querytee-image.outputs.image_digest_linux_amd64 }}"
|
||||
"IMAGE_DIGEST_ARM": "${{ needs.querytee-image.outputs.image_digest_linux_arm }}"
|
||||
"IMAGE_DIGEST_ARM64": "${{ needs.querytee-image.outputs.image_digest_linux_arm64 }}"
|
||||
"OUTPUTS_IMAGE_NAME": "${{ needs.querytee-image.outputs.image_name }}"
|
||||
"OUTPUTS_IMAGE_TAG": "${{ needs.querytee-image.outputs.image_tag }}"
|
||||
"needs":
|
||||
- "querytee-image"
|
||||
"permissions":
|
||||
"contents": "read"
|
||||
"id-token": "write"
|
||||
"runs-on": "ubuntu-latest"
|
||||
"steps":
|
||||
- "name": "Set up Docker buildx"
|
||||
"uses": "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2"
|
||||
- "name": "Login to DockerHub (from Vault)"
|
||||
"uses": "grafana/shared-workflows/actions/dockerhub-login@75804962c1ba608148988c1e2dc35fbb0ee21746"
|
||||
- "name": "Publish multi-arch manifest"
|
||||
"run": |
|
||||
# Unfortunately there is no better way atm than having a separate named output for each digest
|
||||
echo "linux/arm64 $IMAGE_DIGEST_ARM64"
|
||||
echo "linux/amd64 $IMAGE_DIGEST_AMD64"
|
||||
echo "linux/arm $IMAGE_DIGEST_ARM"
|
||||
IMAGE="${OUTPUTS_IMAGE_NAME}:${OUTPUTS_IMAGE_TAG}"
|
||||
echo "Create multi-arch manifest for $IMAGE"
|
||||
docker buildx imagetools create -t $IMAGE \
|
||||
${OUTPUTS_IMAGE_NAME}@${IMAGE_DIGEST_ARM64} \
|
||||
${OUTPUTS_IMAGE_NAME}@${IMAGE_DIGEST_AMD64} \
|
||||
${OUTPUTS_IMAGE_NAME}@${IMAGE_DIGEST_ARM}
|
||||
docker buildx imagetools inspect $IMAGE
|
||||
"trigger-cd":
|
||||
"env":
|
||||
"IMAGE_TAG": "${{ needs.loki-image.outputs.image_tag }}"
|
||||
@@ -532,4 +656,4 @@
|
||||
"workflow_dispatch": {}
|
||||
"permissions":
|
||||
"contents": "read"
|
||||
"pull-requests": "read"
|
||||
"pull-requests": "read"
|
||||
|
||||
8
.github/workflows/minor-release-pr.yml
vendored
8
.github/workflows/minor-release-pr.yml
vendored
@@ -8,7 +8,7 @@ env:
|
||||
DRY_RUN: false
|
||||
GITHUB_APP: "loki-gh-app"
|
||||
IMAGE_PREFIX: "grafana"
|
||||
RELEASE_LIB_REF: "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
RELEASE_LIB_REF: "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
RELEASE_REPO: "grafana/loki"
|
||||
SKIP_VALIDATION: false
|
||||
USE_GITHUB_APP_TOKEN: true
|
||||
@@ -19,11 +19,11 @@ jobs:
|
||||
contents: "write"
|
||||
id-token: "write"
|
||||
pull-requests: "write"
|
||||
uses: "grafana/loki-release/.github/workflows/check.yml@dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
uses: "grafana/loki-release/.github/workflows/check.yml@fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
with:
|
||||
build_image: "grafana/loki-build-image:0.34.9"
|
||||
golang_ci_lint_version: "v2.5.0"
|
||||
release_lib_ref: "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
release_lib_ref: "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
skip_validation: false
|
||||
use_github_app_token: true
|
||||
create-release-pr:
|
||||
@@ -1192,4 +1192,4 @@ name: "Prepare Minor Release PR from Weekly"
|
||||
- "k[0-9]+"
|
||||
permissions:
|
||||
contents: "read"
|
||||
pull-requests: "read"
|
||||
pull-requests: "read"
|
||||
|
||||
8
.github/workflows/patch-release-pr.yml
vendored
8
.github/workflows/patch-release-pr.yml
vendored
@@ -8,7 +8,7 @@ env:
|
||||
DRY_RUN: false
|
||||
GITHUB_APP: "loki-gh-app"
|
||||
IMAGE_PREFIX: "grafana"
|
||||
RELEASE_LIB_REF: "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
RELEASE_LIB_REF: "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
RELEASE_REPO: "grafana/loki"
|
||||
SKIP_VALIDATION: false
|
||||
USE_GITHUB_APP_TOKEN: true
|
||||
@@ -19,11 +19,11 @@ jobs:
|
||||
contents: "write"
|
||||
id-token: "write"
|
||||
pull-requests: "write"
|
||||
uses: "grafana/loki-release/.github/workflows/check.yml@dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
uses: "grafana/loki-release/.github/workflows/check.yml@fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
with:
|
||||
build_image: "grafana/loki-build-image:0.34.9"
|
||||
golang_ci_lint_version: "v2.5.0"
|
||||
release_lib_ref: "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
release_lib_ref: "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
skip_validation: false
|
||||
use_github_app_token: true
|
||||
create-release-pr:
|
||||
@@ -1192,4 +1192,4 @@ name: "Prepare Patch Release PR"
|
||||
- "release-[0-9]+.[0-9]+.x"
|
||||
permissions:
|
||||
contents: "read"
|
||||
pull-requests: "read"
|
||||
pull-requests: "read"
|
||||
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -5,7 +5,7 @@ env:
|
||||
GITHUB_APP: "loki-gh-app"
|
||||
IMAGE_PREFIX: "grafana"
|
||||
PUBLISH_TO_GCS: false
|
||||
RELEASE_LIB_REF: "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
|
||||
RELEASE_LIB_REF: "fb3b12ec3e6411bcb951a5ea08cc983c2f2735fc"
|
||||
RELEASE_REPO: "grafana/loki"
|
||||
USE_GITHUB_APP_TOKEN: true
|
||||
jobs:
|
||||
@@ -441,4 +441,4 @@ name: "create release"
|
||||
- "main"
|
||||
permissions:
|
||||
contents: "read"
|
||||
pull-requests: "read"
|
||||
pull-requests: "read"
|
||||
|
||||
Reference in New Issue
Block a user