Allow skip-tls-verify option for testing

This commit is contained in:
Tomasz Cholewa 2019-08-05 15:32:48 +02:00 committed by Nándor István Krácser
parent 4340afa523
commit 3da5de27d7
2 changed files with 7 additions and 0 deletions

View file

@ -28,11 +28,16 @@ fi
DOCKERFILE=${PLUGIN_DOCKERFILE:-Dockerfile}
CONTEXT=${PLUGIN_CONTEXT:-$PWD}
LOG=${PLUGIN_LOG:-info}
EXTRA_OPTS=""
if [[ -n "${PLUGIN_TARGET:-}" ]]; then
TARGET="--target=${PLUGIN_TARGET}"
fi
if [[ "${PLUGIN_SKIP_TLS_VERIFY:-}" == "true" ]]; then
EXTRA_OPTS="--skip-tls-verify=true"
fi
if [[ "${PLUGIN_CACHE:-}" == "true" ]]; then
CACHE="--cache=true"
fi
@ -54,6 +59,7 @@ fi
/kaniko/executor -v ${LOG} \
--context=${CONTEXT} \
--dockerfile=${DOCKERFILE} \
${EXTRA_OPTS} \
${DESTINATIONS} \
${CACHE:-} \
${TARGET:-} \