Fix mirror script - rolled back changes proposed by shellcheck.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
cf1aa3e65f
commit
65c4f0b4db
10
mirror.sh
10
mirror.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user