allow for multiple tags
This commit is contained in:
parent
4981f60ed9
commit
5b35b92963
@ -19,7 +19,6 @@ cat > /kaniko/.docker/config.json <<DOCKERJSON
|
||||
DOCKERJSON
|
||||
|
||||
DOCKERFILE=${PLUGIN_DOCKERFILE:-Dockerfile}
|
||||
DESTINATION=${PLUGIN_REPO}:${PLUGIN_TAGS:-latest}
|
||||
CONTEXT=${PLUGIN_CONTEXT:-$PWD}
|
||||
LOG=${PLUGIN_LOG:-info}
|
||||
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)
|
||||
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} \
|
||||
--context=${CONTEXT} \
|
||||
--dockerfile=${DOCKERFILE} \
|
||||
--destination=${DESTINATION} \
|
||||
--cache=${CACHE} \
|
||||
${DESTINATIONS} \
|
||||
${BUILD_ARGS:-}
|
||||
|
Reference in New Issue
Block a user