Files
grafana/scripts/drone/pipelines/test_frontend.star
Dan Cech 440d8a3d88 Build: Drone starlark file cleanup (#59919)
* format drone starlark files with black

* clean up unused params

* more simplification

* more cleanup

* more cleanup
2022-12-07 09:13:57 +02:00

71 lines
1.7 KiB
Plaintext

load(
'scripts/drone/steps/lib.star',
'identify_runner_step',
'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',
'with_deps',
)
def test_frontend(trigger, ver_mode, committish):
environment = {'EDITION': 'oss'}
steps = [
identify_runner_step(),
download_grabpl_step(),
yarn_install_step(),
betterer_frontend_step(edition='oss'),
test_frontend_step(edition='oss'),
]
pipeline_name = '{}-test-frontend'.format(ver_mode)
if ver_mode in ("release-branch", "release"):
pipeline_name = '{}-{}-test-frontend'.format(ver_mode, 'oss')
return pipeline(
name=pipeline_name,
edition='oss',
trigger=trigger,
steps=steps,
environment=environment,
)
def test_frontend_enterprise(trigger, ver_mode, committish, edition='enterprise'):
environment = {'EDITION': edition}
steps = (
[
clone_enterprise_step(committish),
init_enterprise_step(ver_mode),
identify_runner_step(),
download_grabpl_step(),
]
+ with_deps([yarn_install_step()], ['init-enterprise'])
+ [
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,
steps=steps,
environment=environment,
)