summaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2019-05-02 10:16:42 +0200
committerKarel Kočí <karel.koci@nic.cz>2019-05-02 10:16:42 +0200
commit0f1bbf4cc4fe858a52d94cf27aee65d32109ec44 (patch)
tree9e9526d4b701a53894f794098e2d835c5df9d049 /jobs
parentf343f9037cea5ce93718647ed3ae9a12f072df23 (diff)
downloadlaminar-cnf-0f1bbf4cc4fe858a52d94cf27aee65d32109ec44.tar.gz
laminar-cnf-0f1bbf4cc4fe858a52d94cf27aee65d32109ec44.tar.bz2
laminar-cnf-0f1bbf4cc4fe858a52d94cf27aee65d32109ec44.zip
Add turris updater configuration deployer
Diffstat (limited to 'jobs')
-rw-r--r--jobs/turris-updater-conf.conf2
-rwxr-xr-xjobs/turris-updater-conf.run17
2 files changed, 19 insertions, 0 deletions
diff --git a/jobs/turris-updater-conf.conf b/jobs/turris-updater-conf.conf
new file mode 100644
index 0000000..ee7375a
--- /dev/null
+++ b/jobs/turris-updater-conf.conf
@@ -0,0 +1,2 @@
+TAGS=rapid
+TIMEOUT=3600
diff --git a/jobs/turris-updater-conf.run b/jobs/turris-updater-conf.run
new file mode 100755
index 0000000..8e39810
--- /dev/null
+++ b/jobs/turris-updater-conf.run
@@ -0,0 +1,17 @@
+#!/bin/sh
+# vim: ft=sh
+. "$(dirname "$(readlink -f "$0")")/../job.common"
+
+echo_stage "Get personal repository"
+git_clone "git@cynerd.cz:openwrt-personal-pkgs" pkgs
+
+echo_stage "Signing"
+signify -S -s ~/openwrt-repo.key -m pkgs/updater.lua
+
+echo_stage "Deploy"
+scp -r pkgs/updater.lua{,.sig} upload:
+ssh upload /bin/sh -e <<EOF
+ mkdir -p "/var/www/repo/turris"
+ mv updater.lua "/var/www/repo/turris/updater.lua"
+ mv updater.lua.sig "/var/www/repo/turris/updater.lua.sig"
+EOF