Make compile-build-cmd depend on init-enterprise (#53029)

This commit is contained in:
Dimitris Sotirakis
2022-08-01 12:56:06 +02:00
committed by GitHub
parent 96564be396
commit cea4b3fb19
3 changed files with 33 additions and 6 deletions

View File

@ -306,7 +306,7 @@ def get_enterprise_pipelines(trigger, ver_mode):
identify_runner_step(),
clone_enterprise_step(ver_mode),
init_enterprise_step(ver_mode),
compile_build_cmd(),
compile_build_cmd(edition),
]
for step in [wire_install_step(), yarn_install_step(), gen_version_step(ver_mode), verify_gen_cue_step(edition)]:
step.update(deps_on_clone_enterprise_step)

View File

@ -1213,14 +1213,18 @@ def end_to_end_tests_deps(edition):
'end-to-end-tests-various-suite' + enterprise2_suffix(edition),
]
def compile_build_cmd():
return {
def compile_build_cmd(edition='oss'):
dependencies = []
if edition == 'enterprise':
dependencies = ['init-enterprise',]
return {
'name': 'compile-build-cmd',
'image': 'golang:1.17',
'commands': [
"go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd",
],
'depends_on': dependencies,
'environment': {
'CGO_ENABLED': 0,
},
}
},
}