Debug commit.
Some checks failed
continuous-integration/drone/push Build is failing

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

View File

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

View File

@ -4,8 +4,8 @@
WHAT_TO_MIRROR=()
DESTINATION_REGISTRY=code.pztrn.name/containers/mirror
REGISTRY_USER=$1
REGISTRY_PASSWORD=$2
USER=${REGISTRY_USER}
PASSWORD=${REGISTRY_PASSWORD}
MIRROR_CONFIGS=$(ls ./images/*.sh)
for file in "${MIRROR_CONFIGS[@]}"; do
@ -49,10 +49,10 @@ function mirror() {
env
# shellcheck disable=SC2154
echo "Secret test: ${drone_secret} or ${REGISTRY_PASSWORD}"
echo "Secret test: ${drone_secret} or ${PASSWORD}"
# Login to registry.
docker login -u "${REGISTRY_USER}" -p "${REGISTRY_PASSWORD}" "${DESTINATION_REGISTRY}"
docker login -u "${USER}" -p "${PASSWORD}" "${DESTINATION_REGISTRY}"
# Mirror images.
for image in "${WHAT_TO_MIRROR[@]}"; do