From adc10c4ae5cda06c1b97a59cca4f9a5dfdb5c497 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Mon, 21 Nov 2022 16:03:53 +0100 Subject: [PATCH] functions.sh : verification des variables pour se connecter au container registry avant podman push --- functions.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/functions.sh b/functions.sh index 66f183d..5fc5967 100644 --- a/functions.sh +++ b/functions.sh @@ -310,6 +310,7 @@ else: oci_push_to_registry () { if ! skopeo inspect --format "Image ${1} found on remote container registry." docker://${1}; then if podman image exists ${1}; then + ensure_variables_are_defined "CONTAINER_REPO_USER CONTAINER_REPO_PASSWORD" podman login --username ${CONTAINER_REPO_USER} --password ${CONTAINER_REPO_PASSWORD} ${1%%/*} && # Try x times because of unexplained error 500 for i in $(seq 1 3); do podman push ${1} && s=0 && break || s=$? && sleep 1; done; (exit $s) &&