Debug commit.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Stanislav Nikitin 2022-06-27 00:08:44 +05:00
parent ce7044456e
commit 62c2dbf194
Signed by: pztrn
GPG Key ID: 1E944A0F0568B550
2 changed files with 7 additions and 4 deletions

View File

@ -25,6 +25,9 @@ steps:
- name: "mirror"
image: "docker:20.10.17-dind"
pull: if-not-exists
environment:
REGISTRY_SECRET:
from_secret: drone_secret
commands:
- apk add --no-cache bash
- ./mirror.sh drone ${drone_secret}
- ./mirror.sh drone ${REGISTRY_SECRET}

View File

@ -24,7 +24,7 @@ function mirror() {
echo -n "Mirroring ${image}... "
if ! docker pull "${image}" &> /dev/null; then
echo "FAIL"
exit
exit 1
fi
image_hash=$(docker images -a | grep "^${image_name}" | grep "${image_version}" | awk "{' print $3 '}")
@ -32,13 +32,13 @@ function mirror() {
if ! docker tag "${image_hash}" "${DESTINATION_REGISTRY}/${image}" &> /dev/null; then
echo "FAIL"
exit
exit 1
fi
echo -n "pushing... "
if ! docker push "${REGISTRY_TO_MIRROR}/${image}" &> /dev/null; then
echo "FAIL"
exit
exit 1
fi
echo "OK"