enos: make the local build target configurable (#2313)

This makes the `make` build target that is used for local builder
variant configurable. This will allow us to utilize the local builder
variant in downstreams that might use different targets for their build.

* Make the local build target configurable
* Allow cross compiling `linux/amd64` on different platforms.
pull/2733/head
Ryan Cragun 3 years ago committed by GitHub
parent 74f7ce93bc
commit 23f1cdea27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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" {

@ -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"
}

@ -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"]
}

@ -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

@ -88,4 +88,4 @@ fi
# Done!
echo "==> Results:"
ls -hl ${BIN_PARENT_DIR}
ls -hl ${BIN_PARENT_DIR}

Loading…
Cancel
Save