grafana/scripts/drone/pipelines/test_frontend.star

37 lines
1.1 KiB
Plaintext
Raw Normal View History

load(
'scripts/drone/steps/lib.star',
'identify_runner_step',
2022-10-11 15:05:13 +08:00
'clone_enterprise_step',
'init_enterprise_step',
'download_grabpl_step',
'yarn_install_step',
'betterer_frontend_step',
'test_frontend_step',
)
load(
'scripts/drone/utils/utils.star',
'pipeline',
)
def test_frontend(trigger, ver_mode, edition="oss"):
environment = {'EDITION': edition}
2022-10-11 15:05:13 +08:00
init_steps = []
if edition != 'oss':
init_steps.extend([clone_enterprise_step(ver_mode), init_enterprise_step(ver_mode),])
init_steps.extend([
identify_runner_step(),
download_grabpl_step(),
yarn_install_step(edition),
2022-10-11 15:05:13 +08:00
])
test_steps = [
2022-10-11 15:05:13 +08:00
betterer_frontend_step(edition),
test_frontend_step(edition),
]
pipeline_name = '{}-test-frontend'.format(ver_mode)
if ver_mode in ("release-branch", "release"):
pipeline_name = '{}-{}-test-frontend'.format(ver_mode, edition)
return pipeline(
name=pipeline_name, edition=edition, trigger=trigger, services=[], steps=init_steps + test_steps, environment=environment,
)