From 4340afa52323f3134b033381aaa4bcef60b1e93a Mon Sep 17 00:00:00 2001 From: Zicklag Date: Tue, 9 Jul 2019 15:28:05 -0500 Subject: [PATCH] Add Ability To Skip Push This adds the ability to build the image without pushing it by omitting the `tags` and `repo` options. --- plugin.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin.sh b/plugin.sh index 4ea1ed3..5c76605 100755 --- a/plugin.sh +++ b/plugin.sh @@ -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} \