aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2024-09-21 16:06:48 +0200
committerJulien Dessaux2024-09-21 16:30:33 +0200
commitb87152a3359e12aa290b5a0b17d1a4719c454f7e (patch)
tree1cd8fe1eb3994d931ce9a0fadedadd61b125fe63
parentRemoved ods management, git-crypt does not agree with my pipeline (diff)
downloadev-scripts-b87152a3359e12aa290b5a0b17d1a4719c454f7e.tar.gz
ev-scripts-b87152a3359e12aa290b5a0b17d1a4719c454f7e.tar.bz2
ev-scripts-b87152a3359e12aa290b5a0b17d1a4719c454f7e.zip
Re-added ods build and deploy pipeline
This reverts commit 364fdda5e7458b13ae7becaae25430a688350126.
Diffstat (limited to '')
-rw-r--r--ods/ods.sh29
-rw-r--r--ods/ods.yaml22
2 files changed, 51 insertions, 0 deletions
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
diff --git a/ods/ods.yaml b/ods/ods.yaml
new file mode 100644
index 0000000..a2b2ffd
--- /dev/null
+++ b/ods/ods.yaml
@@ -0,0 +1,22 @@
+identities:
+ - "git-crypt-ods"
+ - "ssh"
+name: "ods"
+steps:
+ - label: "git clone"
+ script:
+ path: "../common/git-clone.sh"
+ arguments:
+ - "https://git.adyxax.org/adyxax/ods"
+ - label: "build and deploy"
+ script:
+ path: "./ods.sh"
+ - label: "clean"
+ script:
+ path: "../common/clean.sh"
+runner:
+ identity: "ssh"
+ name: "ssh"
+ parameters:
+ host: "lore.adyxax.org"
+ user: "root"