diff --git a/enos/enos-modules.hcl b/enos/enos-modules.hcl index 247404eaea..c8e48ecc0a 100644 --- a/enos/enos-modules.hcl +++ b/enos/enos-modules.hcl @@ -33,6 +33,8 @@ module "build_crt" { module "build_local" { source = "./modules/build_local" + + build_target = var.local_build_target } module "generate_aws_host_tag_vars" { diff --git a/enos/enos-variables.hcl b/enos/enos-variables.hcl index 81ad5a1bf9..da6caf4bb5 100644 --- a/enos/enos-variables.hcl +++ b/enos/enos-variables.hcl @@ -121,3 +121,9 @@ variable "test_email" { type = string default = null } + +variable "local_build_target" { + description = "Which make build target(s) to use for the local builder variant" + type = string + default = "build-ui build" +} diff --git a/enos/modules/build_local/main.tf b/enos/modules/build_local/main.tf index f53056fb8f..3178b10d70 100644 --- a/enos/modules/build_local/main.tf +++ b/enos/modules/build_local/main.tf @@ -10,12 +10,17 @@ variable "path" { default = "/tmp" } +variable "build_target" { + default = "build-ui build" +} + resource "enos_local_exec" "build" { environment = { "GOOS" = "linux", "GOARCH" = "amd64", "CGO_ENABLED" = 0, "ARTIFACT_PATH" = var.path + "BUILD_TARGET" = var.build_target } scripts = ["${path.module}/templates/build.sh"] } diff --git a/enos/modules/build_local/templates/build.sh b/enos/modules/build_local/templates/build.sh index 0a719fc732..783d017d27 100755 --- a/enos/modules/build_local/templates/build.sh +++ b/enos/modules/build_local/templates/build.sh @@ -10,8 +10,7 @@ npm install --global yarn || true root_dir="$(git rev-parse --show-toplevel)" pushd "${root_dir}" > /dev/null -make build-ui -make build +make ${BUILD_TARGET} zip -j ${ARTIFACT_PATH}/boundary.zip bin/boundary popd > /dev/null diff --git a/scripts/build.sh b/scripts/build.sh index d4625eda96..c0ad62d581 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -88,4 +88,4 @@ fi # Done! echo "==> Results:" -ls -hl ${BIN_PARENT_DIR} \ No newline at end of file +ls -hl ${BIN_PARENT_DIR}