aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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}"