Fix mirror script - rolled back changes proposed by shellcheck.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Stanislav Nikitin 2022-06-27 01:29:22 +05:00
parent cf1aa3e65f
commit 65c4f0b4db
Signed by: pztrn
GPG Key ID: 1E944A0F0568B550
1 changed files with 6 additions and 4 deletions

View File

@ -8,10 +8,11 @@ USER=${REGISTRY_USER}
PASSWORD=${REGISTRY_PASSWORD}
MIRROR_CONFIGS=$(ls ./images/*.sh)
for file in "${MIRROR_CONFIGS[@]}"; do
# shellcheck disable=SC2068
for file in ${MIRROR_CONFIGS[@]}; do
echo "Importing ${file}..."
# shellcheck disable=SC2086
WHAT_TO_MIRROR=( "${WHAT_TO_MIRROR[@]}" "$(bash ${file})" )
# shellcheck disable=SC2086,SC2207,SC2206
WHAT_TO_MIRROR=( ${WHAT_TO_MIRROR[@]} $(bash ${file}) )
done
echo "Images to mirror: ${WHAT_TO_MIRROR[*]}"
@ -27,7 +28,8 @@ function mirror() {
exit 1
fi
image_hash=$(docker images -a | grep "^${image_name}" | grep "${image_version}" | awk "{' print $3 '}")
# shellcheck disable=SC1083
image_hash=$(docker images -a | grep "^${image_name}" | grep "${image_version}" | awk {' print $3 '})
echo -n "${image_hash} received... "
if ! docker tag "${image_hash}" "${DESTINATION_REGISTRY}/${image}"; then