change how to handle the cache setting
This commit is contained in:
parent
c89db83a59
commit
0eb7c2716d
10
plugin.sh
10
plugin.sh
@ -21,10 +21,10 @@ DOCKERJSON
|
||||
DOCKERFILE=${PLUGIN_DOCKERFILE:-Dockerfile}
|
||||
CONTEXT=${PLUGIN_CONTEXT:-$PWD}
|
||||
LOG=${PLUGIN_LOG:-info}
|
||||
case "${PLUGIN_CACHE:-}" in
|
||||
true) CACHE="true" ;;
|
||||
*) CACHE="false" ;;
|
||||
esac
|
||||
|
||||
if [[ "${PLUGIN_CACHE:-}" == "true" ]]; then
|
||||
CACHE="--cache=true"
|
||||
fi
|
||||
|
||||
if [[ -n "${PLUGIN_BUILD_ARGS:-}" ]]; then
|
||||
BUILD_ARGS=$(echo "${PLUGIN_BUILD_ARGS}" | tr ',' '\n' | while read build_arg; do echo "--build-arg=${build_arg}"; done)
|
||||
@ -39,6 +39,6 @@ fi
|
||||
/kaniko/executor -v ${LOG} \
|
||||
--context=${CONTEXT} \
|
||||
--dockerfile=${DOCKERFILE} \
|
||||
--cache=${CACHE} \
|
||||
${DESTINATIONS} \
|
||||
${CACHE:-} \
|
||||
${BUILD_ARGS:-}
|
||||
|
Reference in New Issue
Block a user