CI: Fix verify-prerelease-assets pipeline (#72226)

* Fix verify-prerelease-assets pipeline

* Comment out unused assets
This commit is contained in:
Guilherme Caulada 2023-07-24 18:30:02 -03:00 committed by GitHub
parent 4ba83173ea
commit 142cbc2ec6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 7 deletions

View File

@ -3362,8 +3362,8 @@ steps:
- apt-get update && apt-get install -yq gettext - apt-get update && apt-get install -yq gettext
- printenv GCP_KEY | base64 -d > /tmp/key.json - printenv GCP_KEY | base64 -d > /tmp/key.json
- gcloud auth activate-service-account --key-file=/tmp/key.json - gcloud auth activate-service-account --key-file=/tmp/key.json
- '! ./scripts/list-release-artifacts.sh ${DRONE_TAG} | xargs -n1 gsutil stat | - ./scripts/list-release-artifacts.sh ${DRONE_TAG} | xargs -n1 gsutil stat >> /tmp/stat.log
grep "No URLs matched"' - '! cat /tmp/stat.log | grep "No URLs matched"'
depends_on: depends_on:
- clone - clone
environment: environment:
@ -3371,6 +3371,7 @@ steps:
from_secret: prerelease_bucket from_secret: prerelease_bucket
GCP_KEY: GCP_KEY:
from_secret: gcp_key from_secret: gcp_key
failure: ignore
image: google/cloud-sdk:431.0.0 image: google/cloud-sdk:431.0.0
name: gsutil-stat name: gsutil-stat
trigger: trigger:
@ -3583,14 +3584,15 @@ steps:
- apt-get update && apt-get install -yq gettext - apt-get update && apt-get install -yq gettext
- printenv GCP_KEY | base64 -d > /tmp/key.json - printenv GCP_KEY | base64 -d > /tmp/key.json
- gcloud auth activate-service-account --key-file=/tmp/key.json - gcloud auth activate-service-account --key-file=/tmp/key.json
- '! ./scripts/list-release-artifacts.sh ${DRONE_TAG} | xargs -n1 gsutil stat | - ./scripts/list-release-artifacts.sh ${DRONE_TAG} | xargs -n1 gsutil stat >> /tmp/stat.log
grep "No URLs matched"' - '! cat /tmp/stat.log | grep "No URLs matched"'
depends_on: depends_on:
- clone - clone
environment: environment:
BUCKET: grafana-prerelease-dev BUCKET: grafana-prerelease-dev
GCP_KEY: GCP_KEY:
from_secret: gcp_key from_secret: gcp_key
failure: ignore
image: google/cloud-sdk:431.0.0 image: google/cloud-sdk:431.0.0
name: gsutil-stat name: gsutil-stat
trigger: trigger:
@ -4966,6 +4968,6 @@ kind: secret
name: delivery-bot-app-private-key name: delivery-bot-app-private-key
--- ---
kind: signature kind: signature
hmac: 890baa48e98285eda1bae3f18bf605b9f887fd64206a1f048789c403282305fb hmac: 171ee57a344cc5faf219415c40714ca928e96d135f54282da73cde6cb778478e
... ...

View File

@ -463,8 +463,10 @@ def verify_release_pipeline(
"apt-get update && apt-get install -yq gettext", "apt-get update && apt-get install -yq gettext",
"printenv GCP_KEY | base64 -d > /tmp/key.json", "printenv GCP_KEY | base64 -d > /tmp/key.json",
"gcloud auth activate-service-account --key-file=/tmp/key.json", "gcloud auth activate-service-account --key-file=/tmp/key.json",
"! ./scripts/list-release-artifacts.sh {} | xargs -n1 gsutil stat | grep \"No URLs matched\"".format(version), "./scripts/list-release-artifacts.sh {} | xargs -n1 gsutil stat >> /tmp/stat.log".format(version),
"! cat /tmp/stat.log | grep \"No URLs matched\"",
], ],
"failure": "ignore",
} }
return pipeline( return pipeline(
depends_on = depends_on, depends_on = depends_on,

View File

@ -5,8 +5,11 @@ VERSION="${1:-v9.5.2}"
ERSION="${VERSION#*v}" ERSION="${VERSION#*v}"
ERSION_DEB="${ERSION//-/\~}" ERSION_DEB="${ERSION//-/\~}"
# Unused assets:
# gs://${BUCKET}/artifacts/static-assets/grafana/${ERSION}/public/robots.txt
# gs://${BUCKET}/artifacts/static-assets/grafana-oss/${ERSION}/public/robots.txt
ASSETS=$(cat << EOF ASSETS=$(cat << EOF
gs://${BUCKET}/artifacts/static-assets/grafana-oss/${ERSION}/public/robots.txt
gs://${BUCKET}/artifacts/downloads/${VERSION}/oss/release/grafana-${ERSION_DEB}-1.aarch64.rpm gs://${BUCKET}/artifacts/downloads/${VERSION}/oss/release/grafana-${ERSION_DEB}-1.aarch64.rpm
gs://${BUCKET}/artifacts/downloads/${VERSION}/oss/release/grafana-${ERSION_DEB}-1.aarch64.rpm.sha256 gs://${BUCKET}/artifacts/downloads/${VERSION}/oss/release/grafana-${ERSION_DEB}-1.aarch64.rpm.sha256
gs://${BUCKET}/artifacts/downloads/${VERSION}/oss/release/grafana-${ERSION_DEB}-1.armhfp.rpm gs://${BUCKET}/artifacts/downloads/${VERSION}/oss/release/grafana-${ERSION_DEB}-1.armhfp.rpm