expose env var for debug level of codegen
This commit is contained in:
parent
f501c76acc
commit
bf7457db59
@ -8,6 +8,9 @@ KUBE_VERSIONS=("$@")
|
|||||||
BASE_PKG="go.pinniped.dev"
|
BASE_PKG="go.pinniped.dev"
|
||||||
export GO111MODULE="on"
|
export GO111MODULE="on"
|
||||||
|
|
||||||
|
# Note that you can change this value to 10 to debug the Kubernetes code generator shell scripts used below.
|
||||||
|
debug_level="${CODEGEN_LOG_LEVEL:-1}"
|
||||||
|
|
||||||
# If we're not running in a container, assume that we want to loop over and run each build
|
# If we're not running in a container, assume that we want to loop over and run each build
|
||||||
# in a container.
|
# in a container.
|
||||||
if [[ -z "${CONTAINED:-}" ]]; then
|
if [[ -z "${CONTAINED:-}" ]]; then
|
||||||
@ -18,6 +21,7 @@ if [[ -z "${CONTAINED:-}" ]]; then
|
|||||||
echo "generating code for ${kubeVersion} using ${CODEGEN_IMAGE}..."
|
echo "generating code for ${kubeVersion} using ${CODEGEN_IMAGE}..."
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
--env CONTAINED=1 \
|
--env CONTAINED=1 \
|
||||||
|
--env CODEGEN_LOG_LEVEL="$debug_level" \
|
||||||
--volume "${ROOT}:/work" \
|
--volume "${ROOT}:/work" \
|
||||||
--workdir "/work" \
|
--workdir "/work" \
|
||||||
"${CODEGEN_IMAGE}" \
|
"${CODEGEN_IMAGE}" \
|
||||||
@ -112,9 +116,6 @@ EOF
|
|||||||
echo "running go mod download in ${OUTPUT_DIR}/client/go.mod to generate a go.sum file..."
|
echo "running go mod download in ${OUTPUT_DIR}/client/go.mod to generate a go.sum file..."
|
||||||
(cd "${OUTPUT_DIR}/client" && go mod download all 2>&1 | sed "s|^|go-mod-download > |")
|
(cd "${OUTPUT_DIR}/client" && go mod download all 2>&1 | sed "s|^|go-mod-download > |")
|
||||||
|
|
||||||
# Note that you can change this value to 10 to debug the Kubernetes code generator shell scripts used below.
|
|
||||||
debug_level=1
|
|
||||||
|
|
||||||
# Generate API-related code for our public API groups
|
# Generate API-related code for our public API groups
|
||||||
echo "generating API-related code for our public API groups..."
|
echo "generating API-related code for our public API groups..."
|
||||||
(cd apis &&
|
(cd apis &&
|
||||||
|
Loading…
Reference in New Issue
Block a user