Files
grafana/scripts/drone/pipelines/test_frontend.star
T
Guilherme CauladaandDimitris Sotirakis c47c8ddf14 [v9.5.x] CI: Removes enterprise specific pipelines and steps (#71780)
[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>
2023-07-18 12:24:27 -03:00

52 lines
1.2 KiB
Python

"""
This module returns the pipeline used for testing backend code.
"""
load(
"scripts/drone/steps/lib.star",
"betterer_frontend_step",
"download_grabpl_step",
"enterprise_setup_step",
"identify_runner_step",
"test_frontend_step",
"yarn_install_step",
)
load(
"scripts/drone/utils/utils.star",
"pipeline",
)
def test_frontend(trigger, ver_mode):
"""Generates the pipeline used for testing frontend code.
Args:
trigger: a Drone trigger for the pipeline
ver_mode: indirectly controls which revision of enterprise code to use.
Returns:
Drone pipeline.
"""
environment = {"EDITION": "oss"}
steps = [
identify_runner_step(),
download_grabpl_step(),
yarn_install_step(),
betterer_frontend_step(),
]
test_step = test_frontend_step()
if ver_mode == "pr":
# In pull requests, attempt to clone grafana enterprise.
steps.append(enterprise_setup_step())
steps.append(test_step)
return pipeline(
name = "{}-test-frontend".format(ver_mode),
trigger = trigger,
steps = steps,
environment = environment,
)