The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/scripts/drone/pipelines/publish_images.star

57 lines
1.3 KiB

"""
This module returns the pipeline used for publishing Docker images and its steps.
"""
load(
"scripts/drone/steps/lib.star",
"compile_build_cmd",
"download_grabpl_step",
"fetch_images_step",
"identify_runner_step",
"publish_images_step",
)
load(
"scripts/drone/utils/utils.star",
"pipeline",
)
def publish_image_steps(docker_repo):
"""Generates the steps used for publising Docker images using grabpl.
Args:
docker_repo: the Docker image name.
It is combined with the 'grafana/' library prefix.
Returns:
List of Drone steps.
"""
steps = [
identify_runner_step(),
download_grabpl_step(),
compile_build_cmd(),
fetch_images_step(),
publish_images_step("release", docker_repo),
publish_images_step("release", "grafana-oss"),
]
return steps
def publish_image_pipelines_public():
"""Generates the pipeline used for publising public Docker images.
Returns:
Drone pipeline
"""
mode = "public"
trigger = {
"event": ["promote"],
"target": [mode],
}
return [
pipeline(
name = "publish-docker-{}".format(mode),
trigger = trigger,
steps = publish_image_steps(docker_repo = "grafana"),
environment = {"EDITION": "oss"},
),
]