Drone: Do not upload artifacts if e2e tests have not run (#82451)

pull/82511/head
Sofia Papagiannaki 1 year ago committed by GitHub
parent b7b83ded71
commit 6a47c8da8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      .drone.yml
  2. 2
      scripts/drone/steps/lib.star

@ -654,6 +654,8 @@ steps:
repo: repo:
- grafana/grafana - grafana/grafana
- commands: - commands:
- if [ -z `find ./e2e -type f -name *spec.ts.mp4` ]; then echo 'missing videos';
false; fi
- apt-get update - apt-get update
- apt-get install -yq zip - apt-get install -yq zip
- printenv GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY > /tmp/gcpkey_upload_artifacts.json - printenv GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY > /tmp/gcpkey_upload_artifacts.json
@ -1928,6 +1930,8 @@ steps:
repo: repo:
- grafana/grafana - grafana/grafana
- commands: - commands:
- if [ -z `find ./e2e -type f -name *spec.ts.mp4` ]; then echo 'missing videos';
false; fi
- apt-get update - apt-get update
- apt-get install -yq zip - apt-get install -yq zip
- printenv GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY > /tmp/gcpkey_upload_artifacts.json - printenv GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY > /tmp/gcpkey_upload_artifacts.json
@ -4800,6 +4804,6 @@ kind: secret
name: gcr_credentials name: gcr_credentials
--- ---
kind: signature kind: signature
hmac: c5243aaa05fbb21c64d03465f079ad710c9dcddb81db19b89ebb61cc9b60bc72 hmac: 2a70d8442b85841e1b882c9562e8cc42b0c4b697a49ee03d086218f79cdff660
... ...

@ -344,6 +344,8 @@ def e2e_tests_artifacts():
"GITHUB_TOKEN": from_secret("github_token"), "GITHUB_TOKEN": from_secret("github_token"),
}, },
"commands": [ "commands": [
# if no videos found do nothing
"if [ -z `find ./e2e -type f -name *spec.ts.mp4` ]; then echo 'missing videos'; false; fi",
"apt-get update", "apt-get update",
"apt-get install -yq zip", "apt-get install -yq zip",
"printenv GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY > /tmp/gcpkey_upload_artifacts.json", "printenv GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY > /tmp/gcpkey_upload_artifacts.json",

Loading…
Cancel
Save