From 1cee9af372127c7e870db1ddebf7f612e43844d9 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Fri, 12 Aug 2022 19:59:57 +0200 Subject: [PATCH] peerjs : use gitea as container repo (6) --- podman-peerjs/.gitlab-ci.yml | 1 + podman-peerjs/10_install.sh | 3 +-- podman-peerjs/50_update.sh | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/podman-peerjs/.gitlab-ci.yml b/podman-peerjs/.gitlab-ci.yml index 60add8a..d09b475 100644 --- a/podman-peerjs/.gitlab-ci.yml +++ b/podman-peerjs/.gitlab-ci.yml @@ -6,6 +6,7 @@ peerjs: stage: test script: - cd podman-peerjs + - ./zz_build-images.sh - GARBAYE_PEERJS_ENV_LISTENPORT=18081 ./10_install.sh - ./20_enable.sh - ./30_start.sh && sleep 10 diff --git a/podman-peerjs/10_install.sh b/podman-peerjs/10_install.sh index 71a7ad0..d70c0e1 100755 --- a/podman-peerjs/10_install.sh +++ b/podman-peerjs/10_install.sh @@ -9,8 +9,7 @@ ensure_not_root ensure_container_not_exists ${container_name} -source ${ABSDIR}/zz_build-images.sh - +podman pull ${upstream_images}:${version} && podman run --name ${container_name} --user nobody -p ${listen_if}:${listen_port}:9000 -d ${upstream_images}:${version} && ( podman logs -f peerjs-server 2>&1 & ) | grep -q 'Started PeerServer' && podman stop ${container_name} && diff --git a/podman-peerjs/50_update.sh b/podman-peerjs/50_update.sh index 4bcd19d..d86d1de 100755 --- a/podman-peerjs/50_update.sh +++ b/podman-peerjs/50_update.sh @@ -19,15 +19,15 @@ fi echo Rebuilding container ${container_name} with image ${upstream_imageversion} -# build first for minimal downtime -source ${ABSDIR}/zz_build-images.sh +# pull first for minimal downtime +podman pull ${upstream_images}:${version} && -${ABSDIR}/40_stop.sh -${ABSDIR}/80_destroy.sh -${ABSDIR}/10_install.sh -${ABSDIR}/20_enable.sh -${ABSDIR}/30_start.sh +${ABSDIR}/40_stop.sh && +${ABSDIR}/80_destroy.sh && +${ABSDIR}/10_install.sh && +${ABSDIR}/20_enable.sh && +${ABSDIR}/30_start.sh && -podman rmi ${current_imageversion} +podman rmi ${current_imageversion} && ${ABSDIR}/00_status.sh