allow for multiple tags
This commit is contained in:
parent
4981f60ed9
commit
5b35b92963
@ -19,7 +19,6 @@ cat > /kaniko/.docker/config.json <<DOCKERJSON
|
|||||||
DOCKERJSON
|
DOCKERJSON
|
||||||
|
|
||||||
DOCKERFILE=${PLUGIN_DOCKERFILE:-Dockerfile}
|
DOCKERFILE=${PLUGIN_DOCKERFILE:-Dockerfile}
|
||||||
DESTINATION=${PLUGIN_REPO}:${PLUGIN_TAGS:-latest}
|
|
||||||
CONTEXT=${PLUGIN_CONTEXT:-$PWD}
|
CONTEXT=${PLUGIN_CONTEXT:-$PWD}
|
||||||
LOG=${PLUGIN_LOG:-info}
|
LOG=${PLUGIN_LOG:-info}
|
||||||
case "${PLUGIN_CACHE:-}" in
|
case "${PLUGIN_CACHE:-}" in
|
||||||
@ -31,9 +30,15 @@ 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
|
||||||
|
|
||||||
|
if [[ -n "${PLUGIN_TAGS:-}" ]]; then
|
||||||
|
DESTINATIONS=$(echo "${PLUGIN_TAGS}" | tr ',' '\n' | while read tag; do echo "--destination=${PLUGIN_REPO}:${tag} "; done)
|
||||||
|
else
|
||||||
|
DESTINATIONS="--destination=${PLUGIN_REPO}:latest"
|
||||||
|
fi
|
||||||
|
|
||||||
/kaniko/executor -v ${LOG} \
|
/kaniko/executor -v ${LOG} \
|
||||||
--context=${CONTEXT} \
|
--context=${CONTEXT} \
|
||||||
--dockerfile=${DOCKERFILE} \
|
--dockerfile=${DOCKERFILE} \
|
||||||
--destination=${DESTINATION} \
|
|
||||||
--cache=${CACHE} \
|
--cache=${CACHE} \
|
||||||
|
${DESTINATIONS} \
|
||||||
${BUILD_ARGS:-}
|
${BUILD_ARGS:-}
|
||||||
|
Loading…
Reference in New Issue
Block a user