From 9bf82c37e3a2b71e07c1ef6f75c4b634c1764a71 Mon Sep 17 00:00:00 2001 From: Dimitris Sotirakis Date: Thu, 24 Mar 2022 11:54:58 +0000 Subject: [PATCH] Fetch tags after cloning (#46921) --- .drone.yml | 4 +++- scripts/drone/pipelines/main.star | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 7db6d24b94d..bd5f7a9b41c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -706,9 +706,11 @@ steps: - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" --depth=1 - cd grafana-enterprise + - git fetch origin "refs/tags/*:refs/tags/*" - git tag -d $${TEST_TAG} && git push --delete origin $${TEST_TAG} && git tag $${TEST_TAG} && git push origin $${TEST_TAG} - cd - + - git fetch origin "refs/tags/*:refs/tags/*" - git remote add downstream https://github.com/grafana/$${DOWNSTREAM_REPO}.git - git tag -d $${TEST_TAG} && git push --delete downstream $${TEST_TAG} && git tag $${TEST_TAG} && git push downstream $${TEST_TAG} @@ -4409,6 +4411,6 @@ kind: secret name: gcp_upload_artifacts_key --- kind: signature -hmac: f8ee7ebfe0dd8221b71c0f0d01fa7dfd41be01526959c35b6f2eb4069babbf51 +hmac: a6d1a7ba0b32ac93ba85f81961ee7494818f214829e034f2ef98f88d7728cbd0 ... diff --git a/scripts/drone/pipelines/main.star b/scripts/drone/pipelines/main.star index 1c9b9a84c26..0e30d5f5760 100644 --- a/scripts/drone/pipelines/main.star +++ b/scripts/drone/pipelines/main.star @@ -167,8 +167,10 @@ def trigger_test_release(): 'commands': [ 'git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" --depth=1', 'cd grafana-enterprise', + 'git fetch origin "refs/tags/*:refs/tags/*"', 'git tag -d $${TEST_TAG} && git push --delete origin $${TEST_TAG} && git tag $${TEST_TAG} && git push origin $${TEST_TAG}', 'cd -', + 'git fetch origin "refs/tags/*:refs/tags/*"', 'git remote add downstream https://github.com/grafana/$${DOWNSTREAM_REPO}.git', 'git tag -d $${TEST_TAG} && git push --delete downstream $${TEST_TAG} && git tag $${TEST_TAG} && git push downstream $${TEST_TAG}', ],