CI: Replace enterprise check (#62359)

* Add steps in the pipeline for cloning enterprise when running PR tests.
* Removed enterprise-check from the github action workflows, and removed it from the codeowners file.
This commit is contained in:
Kevin Minehart
2023-02-01 16:55:49 +00:00
committed by GitHub
parent 9d07b77532
commit 3cbaa58b1b
12 changed files with 294 additions and 87 deletions
+20 -4
View File
@@ -6,6 +6,7 @@ load(
"scripts/drone/steps/lib.star",
"compile_build_cmd",
"download_grabpl_step",
"enterprise_setup_step",
"identify_runner_step",
"mysql_integration_tests_step",
"postgres_integration_tests_step",
@@ -23,12 +24,13 @@ load(
"pipeline",
)
def integration_tests(trigger, prefix):
def integration_tests(trigger, prefix, ver_mode = "pr"):
"""Generate a pipeline for integration tests.
Args:
trigger: controls which events can trigger the pipeline execution.
prefix: used in the naming of the pipeline.
ver_mode: defines the event / origin of this build. In this function, if it is set to pr, then it will attempt to clone grafana-enterprise. Otherwise it has no effect.
Returns:
Drone pipeline.
@@ -38,12 +40,26 @@ def integration_tests(trigger, prefix):
services = integration_test_services(edition = "oss")
volumes = integration_test_services_volumes()
init_steps = [
init_steps = []
verify_step = verify_gen_cue_step()
verify_jsonnet_step = verify_gen_jsonnet_step()
if ver_mode == "pr":
# In pull requests, attempt to clone grafana enterprise.
init_steps.append(enterprise_setup_step())
# Ensure that verif_gen_cue happens after we clone enterprise
# At the time of writing this, very_gen_cue is depended on by the wire step which is what everything else depends on.
verify_step["depends_on"].append("clone-enterprise")
verify_jsonnet_step["depends_on"].append("clone-enterprise")
init_steps += [
download_grabpl_step(),
compile_build_cmd(),
identify_runner_step(),
verify_gen_cue_step(),
verify_gen_jsonnet_step(),
verify_step,
verify_jsonnet_step,
wire_install_step(),
]