mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Add option to copy output when running the build shell
This commit is contained in:
parent
68232c328f
commit
4d63e13c9f
11
build/run.sh
11
build/run.sh
@ -25,10 +25,19 @@ set -o pipefail
|
|||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||||
source "$KUBE_ROOT/build/common.sh"
|
source "$KUBE_ROOT/build/common.sh"
|
||||||
|
|
||||||
|
KUBE_RUN_COPY_OUTPUT="${KUBE_RUN_COPY_OUTPUT:-y}"
|
||||||
|
|
||||||
kube::build::verify_prereqs
|
kube::build::verify_prereqs
|
||||||
kube::build::build_image
|
kube::build::build_image
|
||||||
|
|
||||||
|
if [[ ${KUBE_RUN_COPY_OUTPUT} =~ ^[yY]$ ]]; then
|
||||||
|
kube::log::status "Output from this container will be rsynced out upon completion. Set KUBE_RUN_COPY_OUTPUT=n to disable."
|
||||||
|
else
|
||||||
|
kube::log::status "Output from this container will NOT be rsynced out upon completion. Set KUBE_RUN_COPY_OUTPUT=y to enable."
|
||||||
|
fi
|
||||||
|
|
||||||
kube::build::run_build_command "$@"
|
kube::build::run_build_command "$@"
|
||||||
|
|
||||||
if [[ ${KUBE_RUN_COPY_OUTPUT:-y} =~ ^[yY]$ ]]; then
|
if [[ ${KUBE_RUN_COPY_OUTPUT} =~ ^[yY]$ ]]; then
|
||||||
kube::build::copy_output
|
kube::build::copy_output
|
||||||
fi
|
fi
|
||||||
|
@ -24,8 +24,5 @@ set -o pipefail
|
|||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||||
source "${KUBE_ROOT}/build/common.sh"
|
source "${KUBE_ROOT}/build/common.sh"
|
||||||
source "${KUBE_ROOT}/build/lib/release.sh"
|
|
||||||
|
|
||||||
kube::build::verify_prereqs
|
KUBE_RUN_COPY_OUTPUT="${KUBE_RUN_COPY_OUTPUT:-n}" "${KUBE_ROOT}/build/run.sh" bash "$@"
|
||||||
kube::build::build_image
|
|
||||||
kube::build::run_build_command bash || true
|
|
||||||
|
Loading…
Reference in New Issue
Block a user