Skip to content

Commit

Permalink
CI: Fix verify-prerelease-assets pipeline (#72226)
Browse files Browse the repository at this point in the history
* Fix verify-prerelease-assets pipeline

* Comment out unused assets
  • Loading branch information
guicaulada committed Jul 24, 2023
1 parent 4ba8317 commit 142cbc2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
12 changes: 7 additions & 5 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3362,15 +3362,16 @@ steps:
- apt-get update && apt-get install -yq gettext
- printenv GCP_KEY | base64 -d > /tmp/key.json
- gcloud auth activate-service-account --key-file=/tmp/key.json
- '! ./scripts/list-release-artifacts.sh ${DRONE_TAG} | xargs -n1 gsutil stat |
grep "No URLs matched"'
- ./scripts/list-release-artifacts.sh ${DRONE_TAG} | xargs -n1 gsutil stat >> /tmp/stat.log
- '! cat /tmp/stat.log | grep "No URLs matched"'
depends_on:
- clone
environment:
BUCKET:
from_secret: prerelease_bucket
GCP_KEY:
from_secret: gcp_key
failure: ignore
image: google/cloud-sdk:431.0.0
name: gsutil-stat
trigger:
Expand Down Expand Up @@ -3583,14 +3584,15 @@ steps:
- apt-get update && apt-get install -yq gettext
- printenv GCP_KEY | base64 -d > /tmp/key.json
- gcloud auth activate-service-account --key-file=/tmp/key.json
- '! ./scripts/list-release-artifacts.sh ${DRONE_TAG} | xargs -n1 gsutil stat |
grep "No URLs matched"'
- ./scripts/list-release-artifacts.sh ${DRONE_TAG} | xargs -n1 gsutil stat >> /tmp/stat.log
- '! cat /tmp/stat.log | grep "No URLs matched"'
depends_on:
- clone
environment:
BUCKET: grafana-prerelease-dev
GCP_KEY:
from_secret: gcp_key
failure: ignore
image: google/cloud-sdk:431.0.0
name: gsutil-stat
trigger:
Expand Down Expand Up @@ -4966,6 +4968,6 @@ kind: secret
name: delivery-bot-app-private-key
---
kind: signature
hmac: 890baa48e98285eda1bae3f18bf605b9f887fd64206a1f048789c403282305fb
hmac: 171ee57a344cc5faf219415c40714ca928e96d135f54282da73cde6cb778478e

...
4 changes: 3 additions & 1 deletion scripts/drone/events/release.star
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,10 @@ def verify_release_pipeline(
"apt-get update && apt-get install -yq gettext",
"printenv GCP_KEY | base64 -d > /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(
depends_on = depends_on,
Expand Down
5 changes: 4 additions & 1 deletion scripts/list-release-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ VERSION="${1:-v9.5.2}"
ERSION="${VERSION#*v}"
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
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.sha256
gs://${BUCKET}/artifacts/downloads/${VERSION}/oss/release/grafana-${ERSION_DEB}-1.armhfp.rpm
Expand Down

0 comments on commit 142cbc2

Please sign in to comment.