From 0c88b3916286c06acdc10fdbdaf4c51a3ccd299c Mon Sep 17 00:00:00 2001 From: Dimitris Sotirakis Date: Wed, 12 Jan 2022 17:58:35 +0200 Subject: [PATCH] Bug: Make `e2e artifacts upload` run at the end of the pipeline (#43962) * Rename step * Make e2e tests artifacts upload run even on failed e2e tests --- .drone.yml | 50 +++++++++++++++++++++++++++++------- scripts/drone/steps/lib.star | 8 +++++- 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0bd792983d2..50d442ab33c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -258,7 +258,11 @@ steps: GITHUB_TOKEN: from_secret: github_token image: google/cloud-sdk:367.0.0 - name: e2e_tests_artifacts_upload + name: e2e-tests-artifacts-upload + when: + status: + - success + - failure - commands: - yarn storybook:build - ./bin/grabpl verify-storybook @@ -684,7 +688,11 @@ steps: GITHUB_TOKEN: from_secret: github_token image: google/cloud-sdk:367.0.0 - name: e2e_tests_artifacts_upload + name: e2e-tests-artifacts-upload + when: + status: + - success + - failure - commands: - yarn storybook:build - ./bin/grabpl verify-storybook @@ -1286,7 +1294,11 @@ steps: GITHUB_TOKEN: from_secret: github_token image: google/cloud-sdk:367.0.0 - name: e2e_tests_artifacts_upload + name: e2e-tests-artifacts-upload + when: + status: + - success + - failure - commands: - yarn storybook:build - ./bin/grabpl verify-storybook @@ -1885,7 +1897,11 @@ steps: GITHUB_TOKEN: from_secret: github_token image: google/cloud-sdk:367.0.0 - name: e2e_tests_artifacts_upload + name: e2e-tests-artifacts-upload + when: + status: + - success + - failure - commands: - ./bin/grabpl upload-cdn --edition enterprise --bucket "$${PRERELEASE_BUCKET}/artifacts/static-assets" depends_on: @@ -3032,7 +3048,11 @@ steps: GITHUB_TOKEN: from_secret: github_token image: google/cloud-sdk:367.0.0 - name: e2e_tests_artifacts_upload + name: e2e-tests-artifacts-upload + when: + status: + - success + - failure - commands: - yarn storybook:build - ./bin/grabpl verify-storybook @@ -3587,7 +3607,11 @@ steps: GITHUB_TOKEN: from_secret: github_token image: google/cloud-sdk:367.0.0 - name: e2e_tests_artifacts_upload + name: e2e-tests-artifacts-upload + when: + status: + - success + - failure - commands: - ./bin/grabpl upload-cdn --edition enterprise --bucket "grafana-static-assets" depends_on: @@ -4351,7 +4375,11 @@ steps: GITHUB_TOKEN: from_secret: github_token image: google/cloud-sdk:367.0.0 - name: e2e_tests_artifacts_upload + name: e2e-tests-artifacts-upload + when: + status: + - success + - failure - commands: - yarn storybook:build - ./bin/grabpl verify-storybook @@ -4879,7 +4907,11 @@ steps: GITHUB_TOKEN: from_secret: github_token image: google/cloud-sdk:367.0.0 - name: e2e_tests_artifacts_upload + name: e2e-tests-artifacts-upload + when: + status: + - success + - failure - commands: - yarn storybook:build - ./bin/grabpl verify-storybook @@ -5467,6 +5499,6 @@ kind: secret name: gcp_upload_artifacts_key --- kind: signature -hmac: e990d6f5836b0a633877cf673e2e47e6d43443050d3fcae5e3a869fc00c62a0d +hmac: 81173294ad474a12cbb622d9e963e208ddd2a2ac42a30dde6396794923b158a0 ... diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index 3ed4faddb17..5b46a9034a1 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -288,7 +288,7 @@ def store_storybook_step(edition, ver_mode): def e2e_tests_artifacts(edition): return { - 'name': 'e2e_tests_artifacts_upload' + enterprise2_suffix(edition), + 'name': 'e2e-tests-artifacts-upload' + enterprise2_suffix(edition), 'image': 'google/cloud-sdk:367.0.0', 'depends_on': [ 'end-to-end-tests-dashboards-suite', @@ -296,6 +296,12 @@ def e2e_tests_artifacts(edition): 'end-to-end-tests-smoke-tests-suite', 'end-to-end-tests-various-suite', ], + 'when': { + 'status': [ + 'success', + 'failure', + ] + }, 'environment': { 'GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY': from_secret('gcp_upload_artifacts_key'), 'E2E_TEST_ARTIFACTS_BUCKET': 'releng-pipeline-artifacts-dev',