aboutsummaryrefslogtreecommitdiff
path: root/builds/monthly/capsul-coreos.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'builds/monthly/capsul-coreos.yaml')
-rw-r--r--builds/monthly/capsul-coreos.yaml35
1 files changed, 35 insertions, 0 deletions
diff --git a/builds/monthly/capsul-coreos.yaml b/builds/monthly/capsul-coreos.yaml
new file mode 100644
index 0000000..23040d6
--- /dev/null
+++ b/builds/monthly/capsul-coreos.yaml
@@ -0,0 +1,35 @@
+# this builds the capsul coreos template img
+image: alpine/edge
+packages:
+ - rsync
+ - xz
+environment:
+ version: stable
+ slaves:
+ - deploy@baikal.cyberia.club
+sources:
+ - https://git.cyberia.club/services/capsul-images
+secrets:
+ # deploy@baikal.cyberia.club
+ - aac6b8d1-65c1-4d7f-862f-094716b800e3
+triggers:
+ - action: email
+ condition: failure
+ to: ops <j3s@c3f.net>
+tasks:
+ - genimg: |
+ cd capsul-images/coreos
+ sudo ./build $version
+ - deploy: |
+ cd capsul-images/coreos
+ echo "StrictHostKeyChecking=no" >> ~/.ssh/config
+ for server in "${slaves[@]}"
+ do
+ ssh $server mkdir -p /tank/img/coreos/$version
+ rsync -rzP $version/root.img.qcow2 \
+ ${server}:/tank/img/coreos/$version/new_root.img.qcow2
+ ssh $server \
+ mv /tank/img/coreos/$version/new_root.img.qcow2 \
+ /tank/img/coreos/$version/root.img.qcow2
+ done
+