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 image: alpine:3.19
commands: commands:
- apk add -U shellcheck - 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 # 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') TAG=$(echo "${DRONE_TAG:-}" |sed 's/^v//g')
part=$(echo "${TAG}" |tr '.' '\n' |wc -l) part=$(echo "${TAG}" |tr '.' '\n' |wc -l)
# expect number # 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 if [ -z "${TAG:-}" ]; then
echo "latest" > .tags echo "latest" > .tags
@ -85,7 +85,7 @@ if [[ "${PLUGIN_AUTO_TAG:-}" == "true" ]]; then
fi fi
if [ -n "${PLUGIN_MIRRORS:-}" ]; then 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 fi
if [ -n "${PLUGIN_TAGS:-}" ]; then if [ -n "${PLUGIN_TAGS:-}" ]; then
@ -100,15 +100,15 @@ else
CACHE="" CACHE=""
fi fi
/kaniko/executor -v ${LOG} \ /kaniko/executor -v "${LOG}" \
--context=${CONTEXT} \ --context="${CONTEXT}" \
--dockerfile=${DOCKERFILE} \ --dockerfile="${DOCKERFILE}" \
${EXTRA_OPTS} \ "${EXTRA_OPTS}" \
${DESTINATIONS} \ "${DESTINATIONS}" \
${CACHE:-} \ "${CACHE:-}" \
${CACHE_TTL:-} \ "${CACHE_TTL:-}" \
${CACHE_REPO:-} \ "${CACHE_REPO:-}" \
${TARGET:-} \ "${TARGET:-}" \
${BUILD_ARGS:-} \ "${BUILD_ARGS:-}" \
${BUILD_ARGS_FROM_ENV:-} \ "${BUILD_ARGS_FROM_ENV:-}" \
${MIRROR:-} "${MIRROR:-}"