From fd71527f479f58488faaaad6b20a690473b4f6da Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 12 Jan 2024 22:21:11 +0100 Subject: [PATCH] more --- .woodpecker/test-release.yaml | 2 +- plugin.sh | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.woodpecker/test-release.yaml b/.woodpecker/test-release.yaml index 8f36aec..8beda90 100644 --- a/.woodpecker/test-release.yaml +++ b/.woodpecker/test-release.yaml @@ -29,7 +29,7 @@ steps: image: alpine:3.19 commands: - apk add -U shellcheck - - shellcheck -e SC3040 -e SC3010 -e SC3037 -e SC2086 -e SC3020 -e SC2162 *.sh + - shellcheck -e SC3040 -e SC3010 -e SC3037 -e SC3020 -e SC2162 *.sh # TODO: add test of fresh build kaniko diff --git a/plugin.sh b/plugin.sh index b0a8c30..083cb7a 100755 --- a/plugin.sh +++ b/plugin.sh @@ -65,7 +65,7 @@ if [[ "${PLUGIN_AUTO_TAG:-}" == "true" ]]; then TAG=$(echo "${DRONE_TAG:-}" |sed 's/^v//g') part=$(echo "${TAG}" |tr '.' '\n' |wc -l) # expect number - echo ${TAG} |grep -E "[a-z-]" &>/dev/null && isNum=1 || isNum=0 + echo "${TAG}" |grep -E "[a-z-]" &>/dev/null && isNum=1 || isNum=0 if [ -z "${TAG:-}" ]; then echo "latest" > .tags @@ -85,7 +85,7 @@ if [[ "${PLUGIN_AUTO_TAG:-}" == "true" ]]; then fi if [ -n "${PLUGIN_MIRRORS:-}" ]; then - MIRROR="$(echo $PLUGIN_MIRRORS | tr ',' '\n' | while read mirror; do echo "--registry-mirror=${mirror}"; done)" + MIRROR="$(echo "${PLUGIN_MIRRORS}" | tr ',' '\n' | while read mirror; do echo "--registry-mirror=${mirror}"; done)" fi if [ -n "${PLUGIN_TAGS:-}" ]; then @@ -100,15 +100,15 @@ else CACHE="" fi -/kaniko/executor -v ${LOG} \ - --context=${CONTEXT} \ - --dockerfile=${DOCKERFILE} \ - ${EXTRA_OPTS} \ - ${DESTINATIONS} \ - ${CACHE:-} \ - ${CACHE_TTL:-} \ - ${CACHE_REPO:-} \ - ${TARGET:-} \ - ${BUILD_ARGS:-} \ - ${BUILD_ARGS_FROM_ENV:-} \ - ${MIRROR:-} +/kaniko/executor -v "${LOG}" \ + --context="${CONTEXT}" \ + --dockerfile="${DOCKERFILE}" \ + "${EXTRA_OPTS}" \ + "${DESTINATIONS}" \ + "${CACHE:-}" \ + "${CACHE_TTL:-}" \ + "${CACHE_REPO:-}" \ + "${TARGET:-}" \ + "${BUILD_ARGS:-}" \ + "${BUILD_ARGS_FROM_ENV:-}" \ + "${MIRROR:-}"