CI: Trigger tag on CI changes (#55388)
* Trigger tag on CI changes * Use github token available for PRs Remove remote addition * Replace origin with full url Remove fetch for origin Fix fetch Remove --quite Add rebase Stash changes from verify-gen-cue Cleanup * Add --quiet when fetching
This commit is contained in:
@@ -1202,19 +1202,20 @@ def trigger_test_release():
|
||||
'name': 'trigger-test-release',
|
||||
'image': build_image,
|
||||
'environment': {
|
||||
'GITHUB_TOKEN': from_secret('github_token'),
|
||||
'GITHUB_TOKEN': from_secret('github_token_pr'),
|
||||
'DOWNSTREAM_REPO': from_secret('downstream'),
|
||||
'TEST_TAG': 'v0.0.0-test',
|
||||
},
|
||||
'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}',
|
||||
'git fetch origin "refs/tags/*:refs/tags/*" --quiet',
|
||||
'if git show-ref --tags $${TEST_TAG} --quiet; then git tag -d $${TEST_TAG} && git push --delete origin $${TEST_TAG}; fi',
|
||||
'git tag $${TEST_TAG} && git push origin $${TEST_TAG}',
|
||||
'cd -',
|
||||
'git fetch origin "refs/tags/*:refs/tags/*"',
|
||||
'git remote add downstream https://$${GITHUB_TOKEN}@github.com/grafana/$${DOWNSTREAM_REPO}.git',
|
||||
'git tag -d $${TEST_TAG} && git push --delete downstream --quiet $${TEST_TAG} && git tag $${TEST_TAG} && git push downstream $${TEST_TAG} --quiet',
|
||||
'git fetch https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git "refs/tags/*:refs/tags/*" --quiet && git fetch --quiet',
|
||||
'if git show-ref --tags $${TEST_TAG} --quiet; then git tag -d $${TEST_TAG} && git push --delete https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git $${TEST_TAG}; fi',
|
||||
'git tag $${TEST_TAG} && git push https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git $${TEST_TAG}',
|
||||
],
|
||||
'failure': 'ignore',
|
||||
'when': {
|
||||
|
||||
Reference in New Issue
Block a user