|
|
|
@ -69,9 +69,47 @@ load('scripts/drone/vault.star', 'from_secret') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ver_mode = 'main' |
|
|
|
|
trigger = { |
|
|
|
|
'event': ['push',], |
|
|
|
|
'branch': 'main', |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
def main_test_frontend(): |
|
|
|
|
init_steps = [ |
|
|
|
|
identify_runner_step(), |
|
|
|
|
download_grabpl_step(), |
|
|
|
|
gen_version_step(ver_mode), |
|
|
|
|
yarn_install_step(), |
|
|
|
|
] |
|
|
|
|
test_steps = [ |
|
|
|
|
lint_frontend_step(), |
|
|
|
|
test_frontend_step(), |
|
|
|
|
] |
|
|
|
|
return pipeline( |
|
|
|
|
name='main-test-frontend', edition="oss", trigger=trigger, services=[], steps=init_steps + test_steps, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
def main_test_backend(): |
|
|
|
|
init_steps = [ |
|
|
|
|
identify_runner_step(), |
|
|
|
|
download_grabpl_step(), |
|
|
|
|
gen_version_step(ver_mode), |
|
|
|
|
wire_install_step(), |
|
|
|
|
] |
|
|
|
|
test_steps = [ |
|
|
|
|
lint_drone_step(), |
|
|
|
|
codespell_step(), |
|
|
|
|
shellcheck_step(), |
|
|
|
|
lint_backend_step(edition="oss"), |
|
|
|
|
test_backend_step(edition="oss"), |
|
|
|
|
test_backend_integration_step(edition="oss"), |
|
|
|
|
] |
|
|
|
|
return pipeline( |
|
|
|
|
name='main-test-backend', edition="oss", trigger=trigger, services=[], steps=init_steps + test_steps, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_steps(edition): |
|
|
|
|
services = integration_test_services(edition) |
|
|
|
|
init_steps = [ |
|
|
|
|
identify_runner_step(), |
|
|
|
|
download_grabpl_step(), |
|
|
|
@ -170,10 +208,6 @@ def trigger_test_release(): |
|
|
|
|
def main_pipelines(edition): |
|
|
|
|
services = integration_test_services(edition) |
|
|
|
|
volumes = integration_test_services_volumes() |
|
|
|
|
trigger = { |
|
|
|
|
'event': ['push',], |
|
|
|
|
'branch': 'main', |
|
|
|
|
} |
|
|
|
|
drone_change_trigger = { |
|
|
|
|
'event': ['push',], |
|
|
|
|
'branch': 'main', |
|
|
|
@ -191,11 +225,7 @@ def main_pipelines(edition): |
|
|
|
|
} |
|
|
|
|
init_steps, test_steps, build_steps, integration_test_steps, windows_steps, store_steps = get_steps(edition=edition) |
|
|
|
|
|
|
|
|
|
pipelines = [docs_pipelines(edition, ver_mode, trigger), pipeline( |
|
|
|
|
name='main-test', edition=edition, trigger=trigger, services=[], |
|
|
|
|
steps=init_steps + test_steps, |
|
|
|
|
volumes=[], |
|
|
|
|
), pipeline( |
|
|
|
|
pipelines = [docs_pipelines(edition, ver_mode, trigger), main_test_frontend(), main_test_backend(), pipeline( |
|
|
|
|
name='main-build-e2e-publish', edition=edition, trigger=trigger, services=[], |
|
|
|
|
steps=init_steps + build_steps, |
|
|
|
|
volumes=volumes, |
|
|
|
@ -206,17 +236,17 @@ def main_pipelines(edition): |
|
|
|
|
), pipeline( |
|
|
|
|
name='main-windows', edition=edition, trigger=dict(trigger, repo=['grafana/grafana']), |
|
|
|
|
steps=[identify_runner_step('windows')] + windows_steps, |
|
|
|
|
depends_on=['main-test', 'main-build-e2e-publish', 'main-integration-tests'], platform='windows', |
|
|
|
|
depends_on=['main-test-frontend', 'main-test-backend', 'main-build-e2e-publish', 'main-integration-tests'], 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', |
|
|
|
|
), pipeline( |
|
|
|
|
name='main-publish', edition=edition, trigger=dict(trigger, repo=['grafana/grafana']), |
|
|
|
|
steps=[download_grabpl_step(), identify_runner_step(),] + store_steps, |
|
|
|
|
depends_on=['main-test', 'main-build-e2e-publish', 'main-integration-tests', 'main-windows', ], |
|
|
|
|
depends_on=['main-test-frontend', 'main-test-backend', 'main-build-e2e-publish', 'main-integration-tests', 'main-windows', ], |
|
|
|
|
), notify_pipeline( |
|
|
|
|
name='main-notify', slack_channel='grafana-ci-notifications', trigger=dict(trigger, status=['failure']), |
|
|
|
|
depends_on=['main-test', 'main-build-e2e-publish', 'main-integration-tests', 'main-windows', 'main-publish'], |
|
|
|
|
depends_on=['main-test-frontend', 'main-test-backend', 'main-build-e2e-publish', 'main-integration-tests', 'main-windows', 'main-publish'], |
|
|
|
|
template=failure_template, secret='slack_webhook' |
|
|
|
|
)] |
|
|
|
|
|
|
|
|
|