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" image: "docker:20.10.17-dind"
pull: if-not-exists pull: if-not-exists
environment: environment:
REGISTRY_USER: drone
REGISTRY_SECRET: REGISTRY_SECRET:
from_secret: drone_secret from_secret: drone_secret
commands: commands:
- apk add --no-cache bash - apk add --no-cache bash
- ./mirror.sh drone ${REGISTRY_SECRET} - ./mirror.sh

View File

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