|
|
|
@ -49,6 +49,8 @@ load( |
|
|
|
|
'scripts/drone/utils/utils.star', |
|
|
|
|
'pipeline', |
|
|
|
|
'notify_pipeline', |
|
|
|
|
'failure_template', |
|
|
|
|
'drone_change_template', |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
ver_mode = 'main' |
|
|
|
@ -142,6 +144,18 @@ def main_pipelines(edition): |
|
|
|
|
'event': ['push',], |
|
|
|
|
'branch': 'main', |
|
|
|
|
} |
|
|
|
|
drone_change_trigger = { |
|
|
|
|
'event': ['push',], |
|
|
|
|
'branch': 'main', |
|
|
|
|
'paths': { |
|
|
|
|
'include': [ |
|
|
|
|
'.drone.yml', |
|
|
|
|
], |
|
|
|
|
'exclude': [ |
|
|
|
|
'exclude', |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
steps, windows_steps, publish_steps = get_steps(edition=edition) |
|
|
|
|
|
|
|
|
|
if edition == 'enterprise': |
|
|
|
@ -157,6 +171,8 @@ def main_pipelines(edition): |
|
|
|
|
name='windows-main', edition=edition, trigger=trigger, |
|
|
|
|
steps=initialize_step(edition, platform='windows', ver_mode=ver_mode) + windows_steps, |
|
|
|
|
depends_on=['build-main'], platform='windows', |
|
|
|
|
), notify_pipeline( |
|
|
|
|
name='notify-drone-changes', slack_channel='slack-webhooks-test', trigger=drone_change_trigger, template=drone_change_template, secret='drone-changes-webhook', |
|
|
|
|
), |
|
|
|
|
] |
|
|
|
|
if edition != 'enterprise': |
|
|
|
@ -167,8 +183,8 @@ def main_pipelines(edition): |
|
|
|
|
)) |
|
|
|
|
|
|
|
|
|
pipelines.append(notify_pipeline( |
|
|
|
|
name='notify-main', slack_channel='grafana-ci-notifications', trigger=trigger, |
|
|
|
|
depends_on=['build-main', 'windows-main', 'publish-main'], |
|
|
|
|
name='notify-main', slack_channel='grafana-ci-notifications', trigger=dict(trigger, status = ['failure']), |
|
|
|
|
depends_on=['build-main', 'windows-main', 'publish-main'], template=failure_template, secret='slack_webhook' |
|
|
|
|
)) |
|
|
|
|
else: |
|
|
|
|
# Add downstream enterprise pipelines triggerable from OSS builds |
|
|
|
@ -192,8 +208,8 @@ def main_pipelines(edition): |
|
|
|
|
)) |
|
|
|
|
|
|
|
|
|
pipelines.append(notify_pipeline( |
|
|
|
|
name='notify-main-downstream', slack_channel='grafana-enterprise-ci-notifications', trigger=trigger, |
|
|
|
|
depends_on=['build-main-downstream', 'windows-main-downstream', 'publish-main-downstream'], |
|
|
|
|
name='notify-main-downstream', slack_channel='grafana-enterprise-ci-notifications', trigger=dict(trigger, status = ['failure']), |
|
|
|
|
depends_on=['build-main-downstream', 'windows-main-downstream', 'publish-main-downstream'], template=failure_template, secret='slack_webhook', |
|
|
|
|
)) |
|
|
|
|
|
|
|
|
|
return pipelines |
|
|
|
|