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.
This commit is contained in:
1 parent
74f7ce93bc
commit
23f1cdea27
5 files changed
+15
-3
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user