Framadate : store to registry (4)
This commit is contained in:
parent
337280858a
commit
aa1fd1df33
|
@ -308,10 +308,15 @@ 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
|
||||
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) &&
|
||||
podman image rm ${1} &&
|
||||
podman pull ${1}
|
||||
then
|
||||
echo "Error : image ${1} does not exists"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ ensure_pwd_is_scriptdir
|
|||
ensure_not_root
|
||||
|
||||
if ! podman image exists ${framadate_image}:${framadate_version}; then
|
||||
podman build -t "${framadate_image}":"${framadate_version}" --build-arg=version="${framadate_release}" --file ./docker/Dockerfile
|
||||
podman build -t "${framadate_image}":"${framadate_version}" --build-arg=version="${framadate_release}" --file docker/Dockerfile
|
||||
else
|
||||
echo "Image ${framadate_image}:${framadate_version} already built"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue