diff --git a/production/packaging/local/build_and_test b/production/packaging/local/build_and_test index b827f0f2..65c217cf 100755 --- a/production/packaging/local/build_and_test +++ b/production/packaging/local/build_and_test @@ -32,6 +32,9 @@ function _print_runtime() { exit ${STATUS} } +# Default mode to nonprod to build local server and tools to enable all the loggings. +declare MODE=nonprod + function usage() { local exitval=${1-1} cat &>/dev/stderr < Mode can be prod or nonprod. Default: ${MODE} environment variables (all optional): WORKSPACE Set the path to the workspace (repo root) @@ -63,6 +67,11 @@ while [[ $# -gt 0 ]]; do BUILD_AND_TEST_ARGS+=("--with-tests") shift ;; + --mode) + MODE="$2" + shift + shift + ;; --verbose) BUILD_AND_TEST_ARGS+=("--verbose") set -o xtrace @@ -101,6 +110,6 @@ fi source "${BUILDER}" || fail "Failed to source builder.sh" printf "==== Running build_and_test_all_in_docker =====\n" -if ! "${WORKSPACE}"/production/packaging/build_and_test_all_in_docker "${BUILD_AND_TEST_ARGS[@]}" --instance local --platform local; then +if ! "${WORKSPACE}"/production/packaging/build_and_test_all_in_docker "${BUILD_AND_TEST_ARGS[@]}" --instance local --platform local --mode "${MODE}"; then fail "Failed to run build_and_test_all_in_docker" fi