CI: Refactor/Reorder *.star files (#52384)
* Refactor test pipelines * Move pr, main and release starlark files under scripts/drone/event * Move cron.star to scripts/drone/events * Further unused code removal * Introducing build.star * Extract verify_drone.star * Extract windows.star * Extract publish.star * Remove unused code * Fix formatting in main.star
This commit is contained in:
@@ -1173,6 +1173,38 @@ def verify_gen_cue_step(edition):
|
||||
],
|
||||
}
|
||||
|
||||
def trigger_test_release():
|
||||
return {
|
||||
'name': 'trigger-test-release',
|
||||
'image': build_image,
|
||||
'environment': {
|
||||
'GITHUB_TOKEN': from_secret('github_token'),
|
||||
'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}',
|
||||
'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',
|
||||
],
|
||||
'failure': 'ignore',
|
||||
'when': {
|
||||
'paths': {
|
||||
'include': [
|
||||
'.drone.yml',
|
||||
]
|
||||
},
|
||||
'repo': [
|
||||
'grafana/grafana',
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
def artifacts_page_step():
|
||||
return {
|
||||
'name': 'artifacts-page',
|
||||
|
||||
Reference in New Issue
Block a user