configurable cache repository and ttl (#36)
This commit is contained in:
parent
51aa742593
commit
ca7005705e
10
plugin.sh
10
plugin.sh
@ -42,6 +42,14 @@ if [[ "${PLUGIN_CACHE:-}" == "true" ]]; then
|
||||
CACHE="--cache=true"
|
||||
fi
|
||||
|
||||
if [ -n "${PLUGIN_CACHE_REPO:-}" ]; then
|
||||
CACHE_REPO="--cache-repo=${REGISTRY}/${PLUGIN_CACHE_REPO}"
|
||||
fi
|
||||
|
||||
if [ -n "${PLUGIN_CACHE_TTL:-}" ]; then
|
||||
CACHE_TTL="--cache-ttl=${PLUGIN_CACHE_TTL}"
|
||||
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)
|
||||
fi
|
||||
@ -94,6 +102,8 @@ fi
|
||||
${EXTRA_OPTS} \
|
||||
${DESTINATIONS} \
|
||||
${CACHE:-} \
|
||||
${CACHE_TTL:-} \
|
||||
${CACHE_REPO:-} \
|
||||
${TARGET:-} \
|
||||
${BUILD_ARGS:-} \
|
||||
${BUILD_ARGS_FROM_ENV:-}
|
||||
|
Reference in New Issue
Block a user