diff --git a/docker_mirror_sync.sh b/docker_mirror_sync.sh index 260233e3ac597ad2f6984dc1817b9b4aa1c0e692..a7064d84f82ec7cf4b5b2786d11d2e748e0cb48b 100755 --- a/docker_mirror_sync.sh +++ b/docker_mirror_sync.sh @@ -14,9 +14,8 @@ if [ ! -f ${image_file} ] ; then exit 1 fi -MIRROR_DIR=${MIRROR_DIR:-"mirror"} DIGEST_DIR=${DIGEST_DIR:-"digest"} -mkdir -p $MIRROR_DIR $DIGEST_DIR +mkdir -p $DIGEST_DIR while read -r image mirror_image; do mirror_path="docker://${CI_REGISTRY_IMAGE}/${mirror_image}" @@ -24,16 +23,15 @@ while read -r image mirror_image; do if [ -z ${DRY_RUN+x} ]; then echo "Pushing ${mirror_path} to mirror registry" + skopeo --insecure-policy copy --all --src-no-creds \ + --digestfile $digest_path \ + docker://${image} ${mirror_path} else echo "DRY RUN: not pushing ${mirror_path} to mirror registry." - echo "Pulling ${image} from public registry" - mkdir -p "${MIRROR_DIR}/${mirror_image}" - mirror_path="dir:${MIRROR_DIR}/${mirror_image}" + echo "Checking that ${image} exists in public registry" + skopeo --insecure-policy inspect docker://${image} fi - skopeo --insecure-policy copy --all --src-no-creds \ - --digestfile $digest_path \ - docker://${image} ${mirror_path} echo "Synced ${digest_path}, manifest digest: $(cat ${digest_path})" done < "${image_file}" diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000000000000000000000000000000000000..9d91c502210f8493c93ab66d6bc02de1a371acf1 --- /dev/null +++ b/renovate.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "local>cri/iac/infrastructure//renovate-presets" + ], + "regexManagers": [ + { + "fileMatch": ["^mirrored-images$"], + "matchStrings": ["^(?<depName>.*?):(?<currentValue>.*?) "], + "datasourceTemplate": "docker" + } + ] +}