[WIP] CI: Removes enterprise specific pipelines and steps (#70815)
* Removes enterprise specific pipelines and steps (#123)
* Comment out enterprise related pipelines and steps
* Suppress unused variable warning
* Removes all edition arguments
* Remove leftover comments
* Remove redundant oss on pipelines and steps names
* Remove leftover unused variable
* Remove leftovers
* Remove pipeline dependencies
* Rename pipelines
* Fix starlark
---------
Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
(cherry picked from commit 642a81ba75e79138246797302aba5c35575f030d)
* Add editions for static assets
(cherry picked from commit b13939b9af)
Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
58 lines
1.3 KiB
Python
58 lines
1.3 KiB
Python
"""
|
|
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"},
|
|
),
|
|
]
|