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}
|
DOCKERFILE=${PLUGIN_DOCKERFILE:-Dockerfile}
|
||||||
CONTEXT=${PLUGIN_CONTEXT:-$PWD}
|
CONTEXT=${PLUGIN_CONTEXT:-$PWD}
|
||||||
LOG=${PLUGIN_LOG:-info}
|
LOG=${PLUGIN_LOG:-info}
|
||||||
case "${PLUGIN_CACHE:-}" in
|
|
||||||
true) CACHE="true" ;;
|
if [[ "${PLUGIN_CACHE:-}" == "true" ]]; then
|
||||||
*) CACHE="false" ;;
|
CACHE="--cache=true"
|
||||||
esac
|
fi
|
||||||
|
|
||||||
if [[ -n "${PLUGIN_BUILD_ARGS:-}" ]]; then
|
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)
|
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} \
|
/kaniko/executor -v ${LOG} \
|
||||||
--context=${CONTEXT} \
|
--context=${CONTEXT} \
|
||||||
--dockerfile=${DOCKERFILE} \
|
--dockerfile=${DOCKERFILE} \
|
||||||
--cache=${CACHE} \
|
|
||||||
${DESTINATIONS} \
|
${DESTINATIONS} \
|
||||||
|
${CACHE:-} \
|
||||||
${BUILD_ARGS:-}
|
${BUILD_ARGS:-}
|
||||||
|
Reference in New Issue
Block a user