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"
|
CACHE="--cache=true"
|
||||||
fi
|
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
|
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)
|
||||||
fi
|
fi
|
||||||
@ -94,6 +102,8 @@ fi
|
|||||||
${EXTRA_OPTS} \
|
${EXTRA_OPTS} \
|
||||||
${DESTINATIONS} \
|
${DESTINATIONS} \
|
||||||
${CACHE:-} \
|
${CACHE:-} \
|
||||||
|
${CACHE_TTL:-} \
|
||||||
|
${CACHE_REPO:-} \
|
||||||
${TARGET:-} \
|
${TARGET:-} \
|
||||||
${BUILD_ARGS:-} \
|
${BUILD_ARGS:-} \
|
||||||
${BUILD_ARGS_FROM_ENV:-}
|
${BUILD_ARGS_FROM_ENV:-}
|
||||||
|
Loading…
Reference in New Issue
Block a user