From b87152a3359e12aa290b5a0b17d1a4719c454f7e Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 21 Sep 2024 16:06:48 +0200 Subject: Re-added ods build and deploy pipeline This reverts commit 364fdda5e7458b13ae7becaae25430a688350126. --- ods/ods.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 ods/ods.sh (limited to 'ods/ods.sh') diff --git a/ods/ods.sh b/ods/ods.sh new file mode 100644 index 0000000..19441ac --- /dev/null +++ b/ods/ods.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +set -euo pipefail + +WORKDIR="/tmp/${EVENTLINE_JOB_NAME}" + +cleanup() { + rm -rf "${WORKDIR}" +} + +trap cleanup EXIT + +cd "${WORKDIR}" +cat "${EVENTLINE_DIR}/identities/git-crypt-ods/password" |base64 -d > secret +git-crypt unlock secret + +make container-build + +podman run --rm -ti -v "${WORKDIR}:/mnt" \ + --entrypoint "/bin/sh" \ + localhost/ods:latest \ + -c '/bin/cp /usr/local/bin/ods /mnt/' + +SSHKEY="${EVENTLINE_DIR}/identities/ssh/private_key" +SSHOPTS="-i ${SSHKEY} -o StrictHostKeyChecking=accept-new" + +rsync -e "ssh ${SSHOPTS}" "${WORKDIR}/ods" root@ods.adyxax.org:/srv/ods/ +ssh ${SSHOPTS} root@ods.adyxax.org "systemctl restart ods" + +trap - EXIT -- cgit v1.2.3