This commit is contained in:
6543 2024-01-12 22:21:11 +01:00
parent 3d0cbe441b
commit fd71527f47
No known key found for this signature in database
GPG key ID: B8BE6D610E61C862
2 changed files with 15 additions and 15 deletions

View file

@ -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

View file

@ -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:-}"