From 31e01035f9be9cbfb02af41577673cfd0e915baa Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Fri, 25 Feb 2022 10:04:04 +0100 Subject: [PATCH] Jitsi : handling build errors --- podman-jitsi/zz_build-images.sh | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/podman-jitsi/zz_build-images.sh b/podman-jitsi/zz_build-images.sh index 6ca31b3..c422dbf 100755 --- a/podman-jitsi/zz_build-images.sh +++ b/podman-jitsi/zz_build-images.sh @@ -10,19 +10,25 @@ ensure_not_root mkdir docker-jitsi-meet && curl -s -- "https://codeload.github.com/jitsi/docker-jitsi-meet/tar.gz/refs/tags/${version}" | tar xz --strip-components 1 -C docker-jitsi-meet/ && { podman pull docker.io/library/debian:bullseye-slim - podman image exists localhost/jitsi/base:${version} || { + if ! podman image exists localhost/jitsi/base:${version}; then podman build -t localhost/jitsi/base:${version} docker-jitsi-meet/base/ && - podman image tag localhost/jitsi/base:${version} localhost/jitsi/base:latest - } - podman image exists localhost/jitsi/base-java:${version} || { + podman image tag localhost/jitsi/base:${version} localhost/jitsi/base:latest || exit -1 + fi + if ! podman image exists localhost/jitsi/base-java:${version}; then podman build -t localhost/jitsi/base-java:${version} docker-jitsi-meet/base-java && - podman image tag localhost/jitsi/base-java:${version} localhost/jitsi/base-java:latest - } - podman image exists localhost/jitsi/jvb:${version} || podman build -t localhost/jitsi/jvb:${version} docker-jitsi-meet/jvb/ - podman image exists localhost/jitsi/jicofo:${version} || podman build -t localhost/jitsi/jicofo:${version} docker-jitsi-meet/jicofo/ - podman image exists localhost/jitsi/prosody:${version} || podman build -t localhost/jitsi/prosody:${version} docker-jitsi-meet/prosody/ - podman image exists localhost/jitsi/web:${version} || { - podman build -t localhost/jitsi/web:${version} docker-jitsi-meet/web/ + podman image tag localhost/jitsi/base-java:${version} localhost/jitsi/base-java:latest || exit -1 + fi + if ! podman image exists localhost/jitsi/jvb:${version}; then + podman build -t localhost/jitsi/jvb:${version} docker-jitsi-meet/jvb/ || exit -1 + fi + if ! podman image exists localhost/jitsi/jicofo:${version}; then + podman build -t localhost/jitsi/jicofo:${version} docker-jitsi-meet/jicofo/ || exit -1 + fi + if ! podman image exists localhost/jitsi/prosody:${version}; then + podman build -t localhost/jitsi/prosody:${version} docker-jitsi-meet/prosody/ || exit -1 + fi + if ! podman image exists localhost/jitsi/web:${version}; then + podman build -t localhost/jitsi/web:${version} docker-jitsi-meet/web/ || exit -1 podman rmi -f $(podman images -f "dangling=true" -q) - } + fi } ; rm -rf docker-jitsi-meet