2023-01-30 03:27:11 -06:00
|
|
|
"""
|
|
|
|
This module returns all the pipelines used in the event of pushes to the main branch.
|
|
|
|
"""
|
|
|
|
|
2022-07-20 08:43:19 -05:00
|
|
|
load(
|
2023-09-12 10:19:06 -05:00
|
|
|
"scripts/drone/pipelines/build.star",
|
|
|
|
"build_e2e",
|
2022-07-20 08:43:19 -05:00
|
|
|
)
|
|
|
|
load(
|
2023-01-30 03:27:11 -06:00
|
|
|
"scripts/drone/pipelines/docs.star",
|
|
|
|
"docs_pipelines",
|
|
|
|
"trigger_docs_main",
|
2022-07-20 08:43:19 -05:00
|
|
|
)
|
|
|
|
load(
|
2023-09-12 10:19:06 -05:00
|
|
|
"scripts/drone/pipelines/integration_tests.star",
|
|
|
|
"integration_tests",
|
2022-07-20 08:43:19 -05:00
|
|
|
)
|
|
|
|
load(
|
2023-09-12 10:19:06 -05:00
|
|
|
"scripts/drone/pipelines/lint_backend.star",
|
|
|
|
"lint_backend_pipeline",
|
2022-07-20 08:43:19 -05:00
|
|
|
)
|
|
|
|
load(
|
2023-09-12 10:19:06 -05:00
|
|
|
"scripts/drone/pipelines/lint_frontend.star",
|
|
|
|
"lint_frontend_pipeline",
|
2022-07-20 08:43:19 -05:00
|
|
|
)
|
|
|
|
load(
|
2023-09-12 10:19:06 -05:00
|
|
|
"scripts/drone/pipelines/test_backend.star",
|
|
|
|
"test_backend",
|
2022-07-20 08:43:19 -05:00
|
|
|
)
|
|
|
|
load(
|
2023-09-12 10:19:06 -05:00
|
|
|
"scripts/drone/pipelines/test_frontend.star",
|
|
|
|
"test_frontend",
|
2022-07-20 08:43:19 -05:00
|
|
|
)
|
2022-09-19 09:17:36 -05:00
|
|
|
load(
|
2023-01-30 03:27:11 -06:00
|
|
|
"scripts/drone/pipelines/trigger_downstream.star",
|
|
|
|
"enterprise_downstream_pipeline",
|
2022-09-19 09:17:36 -05:00
|
|
|
)
|
2024-06-27 10:43:43 -05:00
|
|
|
load(
|
|
|
|
"scripts/drone/pipelines/verify_storybook.star",
|
|
|
|
"verify_storybook",
|
|
|
|
)
|
2022-09-21 06:05:19 -05:00
|
|
|
load(
|
2023-09-12 10:19:06 -05:00
|
|
|
"scripts/drone/pipelines/windows.star",
|
|
|
|
"windows",
|
2022-09-21 06:05:19 -05:00
|
|
|
)
|
2022-09-21 14:39:28 -05:00
|
|
|
load(
|
2023-09-12 10:19:06 -05:00
|
|
|
"scripts/drone/utils/utils.star",
|
|
|
|
"failure_template",
|
|
|
|
"notify_pipeline",
|
2022-09-21 14:39:28 -05:00
|
|
|
)
|
|
|
|
|
2023-01-30 03:27:11 -06:00
|
|
|
ver_mode = "main"
|
2022-07-20 08:43:19 -05:00
|
|
|
trigger = {
|
2023-01-30 03:27:11 -06:00
|
|
|
"event": [
|
|
|
|
"push",
|
2022-12-07 01:13:57 -06:00
|
|
|
],
|
2023-01-30 03:27:11 -06:00
|
|
|
"branch": "main",
|
|
|
|
"paths": {
|
|
|
|
"exclude": [
|
|
|
|
"*.md",
|
|
|
|
"docs/**",
|
|
|
|
"latest.json",
|
2022-08-03 07:08:43 -05:00
|
|
|
],
|
|
|
|
},
|
2023-07-19 09:03:07 -05:00
|
|
|
"repo": [
|
|
|
|
"grafana/grafana",
|
|
|
|
],
|
2022-07-20 08:43:19 -05:00
|
|
|
}
|
|
|
|
|
2022-12-07 01:13:57 -06:00
|
|
|
def main_pipelines():
|
2022-07-20 08:43:19 -05:00
|
|
|
pipelines = [
|
2022-12-07 01:13:57 -06:00
|
|
|
docs_pipelines(ver_mode, trigger_docs_main()),
|
2023-01-30 03:27:11 -06:00
|
|
|
test_frontend(trigger, ver_mode),
|
2022-09-21 14:39:28 -05:00
|
|
|
lint_frontend_pipeline(trigger, ver_mode),
|
2023-01-30 03:27:11 -06:00
|
|
|
test_backend(trigger, ver_mode),
|
2022-09-21 06:05:19 -05:00
|
|
|
lint_backend_pipeline(trigger, ver_mode),
|
2024-06-27 10:43:43 -05:00
|
|
|
verify_storybook(trigger, ver_mode),
|
2022-12-07 01:13:57 -06:00
|
|
|
build_e2e(trigger, ver_mode),
|
2023-02-01 14:27:57 -06:00
|
|
|
integration_tests(trigger, prefix = ver_mode, ver_mode = ver_mode),
|
2023-07-14 06:18:09 -05:00
|
|
|
windows(trigger, ver_mode = ver_mode),
|
2022-12-07 01:13:57 -06:00
|
|
|
enterprise_downstream_pipeline(),
|
|
|
|
notify_pipeline(
|
2023-01-30 03:27:11 -06:00
|
|
|
name = "main-notify",
|
|
|
|
slack_channel = "grafana-ci-notifications",
|
|
|
|
trigger = dict(trigger, status = ["failure"]),
|
|
|
|
depends_on = [
|
|
|
|
"main-test-frontend",
|
|
|
|
"main-test-backend",
|
|
|
|
"main-build-e2e-publish",
|
|
|
|
"main-integration-tests",
|
|
|
|
"main-windows",
|
2022-12-07 01:13:57 -06:00
|
|
|
],
|
2023-01-30 03:27:11 -06:00
|
|
|
template = failure_template,
|
|
|
|
secret = "slack_webhook",
|
2022-12-07 01:13:57 -06:00
|
|
|
),
|
|
|
|
]
|
2022-07-20 08:43:19 -05:00
|
|
|
|
|
|
|
return pipelines
|