mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CI: add promotion step for publish grafanacom (#93851)
* add promotion step for publish grafanacom * publish-grafanacom depends on compile-build-cmd * use DRONE_TAG * add docstring comment for depends_on
This commit is contained in:
@@ -242,6 +242,17 @@ def publish_packages_pipeline():
|
||||
depends_on = deps,
|
||||
environment = {"EDITION": "oss"},
|
||||
),
|
||||
pipeline(
|
||||
name = "publish-grafanacom",
|
||||
trigger = {
|
||||
"event": ["promote"],
|
||||
"target": "publish-grafanacom",
|
||||
},
|
||||
steps = [
|
||||
compile_build_cmd(),
|
||||
publish_grafanacom_step(ver_mode = "release", depends_on = ["compile-build-cmd"]),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
||||
def publish_npm_pipelines():
|
||||
|
||||
@@ -727,6 +727,7 @@ def frontend_metrics_step(trigger = None):
|
||||
Returns:
|
||||
Drone step.
|
||||
"""
|
||||
|
||||
step = {
|
||||
"name": "publish-frontend-metrics",
|
||||
"image": images["node"],
|
||||
@@ -1178,7 +1179,7 @@ def upload_packages_step(ver_mode, trigger = None):
|
||||
step = dict(step, when = trigger)
|
||||
return step
|
||||
|
||||
def publish_grafanacom_step(ver_mode):
|
||||
def publish_grafanacom_step(ver_mode, depends_on = ["publish-linux-packages-deb", "publish-linux-packages-rpm"]):
|
||||
"""Publishes Grafana packages to grafana.com.
|
||||
|
||||
Args:
|
||||
@@ -1186,6 +1187,7 @@ def publish_grafanacom_step(ver_mode):
|
||||
variable as the value for the --build-id option.
|
||||
TODO: is this actually used by the grafanacom subcommand? I think it might
|
||||
just use the environment variable directly.
|
||||
depends_on: what other steps this one depends on (strings)
|
||||
|
||||
Returns:
|
||||
Drone step.
|
||||
@@ -1203,10 +1205,7 @@ def publish_grafanacom_step(ver_mode):
|
||||
return {
|
||||
"name": "publish-grafanacom",
|
||||
"image": images["publish"],
|
||||
"depends_on": [
|
||||
"publish-linux-packages-deb",
|
||||
"publish-linux-packages-rpm",
|
||||
],
|
||||
"depends_on": depends_on,
|
||||
"environment": {
|
||||
"GRAFANA_COM_API_KEY": from_secret("grafana_api_key"),
|
||||
"GCP_KEY": from_secret(gcp_grafanauploads_base64),
|
||||
|
||||
Reference in New Issue
Block a user