aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKylie McClain <kylie@somas.is>2020-07-01 05:56:00 -0400
committerKylie McClain <kylie@somas.is>2020-07-01 06:04:05 -0400
commit860c29da9653e3c7b4c46dd2a15f990e4fa886f8 (patch)
treeb6dffc81008816c05931dc0ba02490c4b0c80143
parent8dcd04ccc9443572e759042825e2d1b5397355b7 (diff)
downloadgitolite-admin-860c29da9653e3c7b4c46dd2a15f990e4fa886f8.tar.gz
gitolite-admin-860c29da9653e3c7b4c46dd2a15f990e4fa886f8.tar.xz
gitolite-admin-860c29da9653e3c7b4c46dd2a15f990e4fa886f8.zip
gitolite: add laminar-admin repo and hook
-rw-r--r--conf/gitolite.conf5
-rwxr-xr-xlocal/hooks/repo-specific/deploy-laminar-config9
2 files changed, 14 insertions, 0 deletions
diff --git a/conf/gitolite.conf b/conf/gitolite.conf
index c8ede9d..9de65c1 100644
--- a/conf/gitolite.conf
+++ b/conf/gitolite.conf
@@ -17,6 +17,11 @@ repo gitolite-admin
config cgit.section = infrastructure
desc = "Configuration for gitolite and cgit."
+repo laminar-admin
+ config cgit.section = infrastructure
+ option hook.post-receive = deploy-laminar-config
+ desc = "Configuration for Laminar, at ci.mutiny.red."
+
## Personal repositories
repo CREATOR/.*
diff --git a/local/hooks/repo-specific/deploy-laminar-config b/local/hooks/repo-specific/deploy-laminar-config
new file mode 100755
index 0000000..cf00dc2
--- /dev/null
+++ b/local/hooks/repo-specific/deploy-laminar-config
@@ -0,0 +1,9 @@
+#!/bin/execlineb
+
+backtick -n tempdir { mktemp -d }
+importas -u GL_REPO GL_REPO
+importas -u tempdir tempdir
+
+if { git clone -q . "${tempdir}"/laminar }
+if { rsync -ru --del "${tempdir}"/laminar/jobs/ /var/lib/laminar/cfg/jobs/ }
+rm -rf "${tempdir}"