Add Ability To Skip Push

This adds the ability to build the image without pushing it by omitting
the `tags` and `repo` options.
This commit is contained in:
Zicklag 2019-07-09 15:28:05 -05:00 committed by Nándor István Krácser
parent 71121bfd13
commit 4340afa523
1 changed files with 5 additions and 1 deletions

View File

@ -43,8 +43,12 @@ fi
if [ -n "${PLUGIN_TAGS:-}" ]; then
DESTINATIONS=$(echo "${PLUGIN_TAGS}" | tr ',' '\n' | while read tag; do echo "--destination=${REGISTRY}/${PLUGIN_REPO}:${tag} "; done)
else
elif [ -n "${PLUGIN_REPO:-}" ]; then
DESTINATIONS="--destination=${PLUGIN_REPO}:latest"
else
DESTINATIONS="--no-push"
# Cache is not valid with --no-push
CACHE=""
fi
/kaniko/executor -v ${LOG} \