aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoransible_admin <capsul@cyberia.club>2020-11-24 00:35:02 +0000
committeransible_admin <capsul@cyberia.club>2020-11-24 00:35:02 +0000
commit3cafa764aff850a140a9988b81abd15d1bd28ba1 (patch)
tree539499691169eaecc068664c8d634958e7473ce1
parent483ae1a5e324c97f8759bc41988021fe91937697 (diff)
downloadops-handbook-3cafa764aff850a140a9988b81abd15d1bd28ba1.tar.gz
ops-handbook-3cafa764aff850a140a9988b81abd15d1bd28ba1.tar.bz2
Refactor all jobs to be pretty
-rw-r--r--builds/daily/alpine-edge.yaml75
-rw-r--r--builds/daily/capsul-alpine-3.11.yaml60
-rw-r--r--builds/daily/capsul-alpine-3.12.yaml58
-rw-r--r--builds/daily/postgres-backups.yaml39
-rw-r--r--builds/monthly/capsul-centos-7.yaml49
-rw-r--r--builds/monthly/capsul-centos-8.yaml49
-rw-r--r--builds/weekly/alpine-latest.yaml75
-rw-r--r--builds/weekly/debian-oldstable.yaml135
-rw-r--r--builds/weekly/debian-sid.yaml135
-rw-r--r--builds/weekly/debian-stable.yaml135
10 files changed, 495 insertions, 315 deletions
diff --git a/builds/daily/alpine-edge.yaml b/builds/daily/alpine-edge.yaml
index 8d4df86..aea474c 100644
--- a/builds/daily/alpine-edge.yaml
+++ b/builds/daily/alpine-edge.yaml
@@ -1,39 +1,52 @@
# this build is for a runner VM that is accessible via
# builds.cyberia.club
+image: alpine/edge
+packages:
+ - e2fsprogs
+ - qemu-img
+ - qemu-system-x86_64
+ - rsync
+ - sfdisk
+sources:
+ - https://git.sr.ht/~sircmpwn/builds.sr.ht
environment:
arch: x86_64
release: edge
slaves:
- - deploy@192.168.3.3
- - deploy@192.168.3.4
-image: alpine/edge
-packages:
-- e2fsprogs
-- qemu-img
-- qemu-system-x86_64
-- rsync
-- sfdisk
+ - deploy@192.168.3.3
+ - deploy@192.168.3.4
secrets:
-# deploy@muninn.cyberia.club
-- 122dfa69-09f4-433f-85d0-5c97c010e08c
-sources:
-- https://git.sr.ht/~sircmpwn/builds.sr.ht
-tasks:
-- genimg: 'cd builds.sr.ht/images/alpine/$release
-
- sudo ./genimg $arch'
-- kvm: "if grep -i amd /proc/cpuinfo\nthen\n sudo modprobe kvm_amd\nelse\n sudo\
- \ modprobe kvm_intel\nfi\nsleep 1\nsudo chown build:build /dev/kvm"
-- sanity-check: 'cd builds.sr.ht
-
- MEMORY=1024 ./images/control alpine/$release sanity-check'
-- deploy: "cd builds.sr.ht/images/alpine/$release\necho \"StrictHostKeyChecking=no\"\
- \ >> ~/.ssh/config\nfor server in \"${slaves[@]}\"\ndo\n ssh $server mkdir -p\
- \ /var/lib/images/alpine/$release/$arch\n rsync -rzP $arch/root.img.qcow2 \\\n\
- \ ${server}:/var/lib/images/alpine/$release/$arch/new_root.img.qcow2\n ssh\
- \ $server \\\n mv /var/lib/images/alpine/$release/$arch/new_root.img.qcow2\
- \ \\\n /var/lib/images/alpine/$release/$arch/root.img.qcow2\ndone"
+ # deploy@muninn.cyberia.club & deploy@dredd.cyberia.club
+ - 122dfa69-09f4-433f-85d0-5c97c010e08c
triggers:
-- action: email
- condition: failure
- to: j3s <j3s@c3f.net>
+ - action: email
+ condition: failure
+ to: j3s <j3s@c3f.net>
+tasks:
+ - genimg: |
+ cd builds.sr.ht/images/alpine/$release
+ sudo ./genimg $arch
+ - kvm: |
+ if grep -i amd /proc/cpuinfo
+ then
+ sudo modprobe kvm_amd
+ else
+ sudo modprobe kvm_intel
+ fi
+ sleep 1
+ sudo chown build:build /dev/kvm
+ - sanity-check: |
+ cd builds.sr.ht
+ MEMORY=1024 ./images/control alpine/$release sanity-check
+ - deploy: |
+ cd builds.sr.ht/images/alpine/$release
+ echo "StrictHostKeyChecking=no" >> ~/.ssh/config
+ for server in "${slaves[@]}"
+ do
+ ssh $server mkdir -p /var/lib/images/alpine/$release/$arch
+ rsync -rzP $arch/root.img.qcow2 \
+ ${server}:/var/lib/images/alpine/$release/$arch/new_root.img.qcow2
+ ssh $server \
+ mv /var/lib/images/alpine/$release/$arch/new_root.img.qcow2 \
+ /var/lib/images/alpine/$release/$arch/root.img.qcow2
+ done
diff --git a/builds/daily/capsul-alpine-3.11.yaml b/builds/daily/capsul-alpine-3.11.yaml
index 4f00157..a665712 100644
--- a/builds/daily/capsul-alpine-3.11.yaml
+++ b/builds/daily/capsul-alpine-3.11.yaml
@@ -1,32 +1,36 @@
-# this builds the capsul alpine 3.12 template
-
-environment:
- version: 3.12
- slaves:
- - deploy@baikal.cyberia.club
+# this builds the capsul alpine 3.11 template
image: alpine/edge
packages:
-- e2fsprogs
-- qemu-img
-- qemu-system-x86_64
-- rsync
-secrets:
-# deploy@baikal.cyberia.club
-- aac6b8d1-65c1-4d7f-862f-094716b800e3
+ - e2fsprogs
+ - qemu-img
+ - qemu-system-x86_64
+ - rsync
+environment:
+ version: 3.11
+ slaves:
+ - deploy@baikal.cyberia.club
sources:
-- https://git.cyberia.club/services/capsul-images
-tasks:
-- genimg: 'cd capsul-images/alpine
-
- sudo ./build $version'
-- deploy: "cd capsul-images/alpine\necho \"StrictHostKeyChecking=no\"\
- \ >> ~/.ssh/config\nfor server in \"${slaves[@]}\"\ndo\n ssh $server mkdir -p\
- \ /tank/img/alpine/$version\n rsync -rzP $version/root.img.qcow2 \\\n\
- \ ${server}:/tank/img/alpine/$version/new_root.img.qcow2\n ssh\
- \ $server \\\n mv /tank/img/alpine/$version/new_root.img.qcow2\
- \ \\\n /tank/img/alpine/$version/root.img.qcow2\ndone"
+ - https://git.cyberia.club/services/capsul-images
+secrets:
+ # deploy@baikal.cyberia.club
+ - aac6b8d1-65c1-4d7f-862f-094716b800e3
triggers:
-- action: email
- condition: failure
- to: ops <ops@cyberia.club>
-
+ - action: email
+ condition: failure
+ to: ops <ops@cyberia.club>
+tasks:
+ - genimg: |
+ cd capsul-images/alpine
+ sudo ./build $version
+ - deploy: |
+ cd capsul-images/alpine
+ echo "StrictHostKeyChecking=no" >> ~/.ssh/config
+ for server in "${slaves[@]}"
+ do
+ ssh $server mkdir -p /tank/img/alpine/$version
+ rsync -rzP $version/root.img.qcow2 \
+ ${server}:/tank/img/alpine/$version/new_root.img.qcow2
+ ssh $server \
+ mv /tank/img/alpine/$version/new_root.img.qcow2 \
+ /tank/img/alpine/$version/root.img.qcow2
+ done
diff --git a/builds/daily/capsul-alpine-3.12.yaml b/builds/daily/capsul-alpine-3.12.yaml
index 4f00157..edeeac7 100644
--- a/builds/daily/capsul-alpine-3.12.yaml
+++ b/builds/daily/capsul-alpine-3.12.yaml
@@ -1,32 +1,36 @@
-# this builds the capsul alpine 3.12 template
-
+# this builds the capsul alpine 3.11 template
+image: alpine/edge
+packages:
+ - e2fsprogs
+ - qemu-img
+ - qemu-system-x86_64
+ - rsync
environment:
version: 3.12
slaves:
- - deploy@baikal.cyberia.club
-image: alpine/edge
-packages:
-- e2fsprogs
-- qemu-img
-- qemu-system-x86_64
-- rsync
-secrets:
-# deploy@baikal.cyberia.club
-- aac6b8d1-65c1-4d7f-862f-094716b800e3
+ - deploy@baikal.cyberia.club
sources:
-- https://git.cyberia.club/services/capsul-images
-tasks:
-- genimg: 'cd capsul-images/alpine
-
- sudo ./build $version'
-- deploy: "cd capsul-images/alpine\necho \"StrictHostKeyChecking=no\"\
- \ >> ~/.ssh/config\nfor server in \"${slaves[@]}\"\ndo\n ssh $server mkdir -p\
- \ /tank/img/alpine/$version\n rsync -rzP $version/root.img.qcow2 \\\n\
- \ ${server}:/tank/img/alpine/$version/new_root.img.qcow2\n ssh\
- \ $server \\\n mv /tank/img/alpine/$version/new_root.img.qcow2\
- \ \\\n /tank/img/alpine/$version/root.img.qcow2\ndone"
+ - https://git.cyberia.club/services/capsul-images
+secrets:
+ # deploy@baikal.cyberia.club
+ - aac6b8d1-65c1-4d7f-862f-094716b800e3
triggers:
-- action: email
- condition: failure
- to: ops <ops@cyberia.club>
-
+ - action: email
+ condition: failure
+ to: ops <ops@cyberia.club>
+tasks:
+ - genimg: |
+ cd capsul-images/alpine
+ sudo ./build $version
+ - deploy: |
+ cd capsul-images/alpine
+ echo "StrictHostKeyChecking=no" >> ~/.ssh/config
+ for server in "${slaves[@]}"
+ do
+ ssh $server mkdir -p /tank/img/alpine/$version
+ rsync -rzP $version/root.img.qcow2 \
+ ${server}:/tank/img/alpine/$version/new_root.img.qcow2
+ ssh $server \
+ mv /tank/img/alpine/$version/new_root.img.qcow2 \
+ /tank/img/alpine/$version/root.img.qcow2
+ done
diff --git a/builds/daily/postgres-backups.yaml b/builds/daily/postgres-backups.yaml
index fd5b753..8ab475a 100644
--- a/builds/daily/postgres-backups.yaml
+++ b/builds/daily/postgres-backups.yaml
@@ -2,17 +2,30 @@
# the backups on a local server in j3s's house
image: alpine/edge
secrets:
-# backups@matrix.cyberia.club
-- 83a7f301-1e06-4fbb-9ab7-43ca3c018a4b
-# backups@192.168.1.246
-- 1a613565-a216-4f37-97c6-2ad41b6fb508
-tasks:
-- prep: echo "StrictHostKeyChecking=no" >> ~/.ssh/config
-- pgdump: ssh backups@matrix.cyberia.club 'pg_dump -h localhost -U synapse_user synapse | gzip' > pgbackup.gz
-- rotate-backup: ssh -i ~/.ssh/1a613565-a216-4f37-97c6-2ad41b6fb508 backups@192.168.1.246 'mv /tank/backups/postgres/matrix-pgbackup.gz /tank/backups/postgres/matrix-pgbackup.gz.old'
-- copy-backup: scp -i ~/.ssh/1a613565-a216-4f37-97c6-2ad41b6fb508 pgbackup.gz backups@192.168.1.246:/tank/backups/postgres/matrix-pgbackup.gz
-- prom: ssh backups@matrix.cyberia.club 'echo pg_backup_completion_time $(date +%s) > /var/lib/prometheus/textfile_collector/pg_backup.prom.$$ && mv /var/lib/prometheus/textfile_collector/pg_backup.prom.$$ /var/lib/prometheus/textfile_collector/pg_backup.prom'
+ # backups@matrix.cyberia.club
+ - 83a7f301-1e06-4fbb-9ab7-43ca3c018a4b
+ # backups@192.168.1.246
+ - 1a613565-a216-4f37-97c6-2ad41b6fb508
triggers:
-- action: email
- condition: failure
- to: ops <ops@cyberia.club>
+ - action: email
+ condition: failure
+ to: ops <ops@cyberia.club>
+tasks:
+ - prep: |
+ echo "StrictHostKeyChecking=no" >> ~/.ssh/config
+ - pgdump: |
+ ssh backups@matrix.cyberia.club \
+ 'pg_dump -h localhost -U synapse_user synapse | gzip' > pgbackup.gz
+ - rotate-backup: |
+ ssh -i ~/.ssh/1a613565-a216-4f37-97c6-2ad41b6fb508 backups@192.168.1.246 \
+ mv /tank/backups/postgres/matrix-pgbackup.gz \
+ /tank/backups/postgres/matrix-pgbackup.gz.old
+ - copy-backup:
+ scp -i ~/.ssh/1a613565-a216-4f37-97c6-2ad41b6fb508 \
+ pgbackup.gz backups@192.168.1.246:/tank/backups/postgres/matrix-pgbackup.gz
+ - prom:
+ ssh backups@matrix.cyberia.club \
+ echo pg_backup_completion_time $(date +%s) \
+ > /var/lib/prometheus/textfile_collector/pg_backup.prom.$$ \
+ && mv /var/lib/prometheus/textfile_collector/pg_backup.prom.$$ \
+ /var/lib/prometheus/textfile_collector/pg_backup.prom'
diff --git a/builds/monthly/capsul-centos-7.yaml b/builds/monthly/capsul-centos-7.yaml
index 72e4901..c43b1ba 100644
--- a/builds/monthly/capsul-centos-7.yaml
+++ b/builds/monthly/capsul-centos-7.yaml
@@ -1,29 +1,34 @@
# this builds the capsul centos 10 template img
-
+image: alpine/edge
+packages:
+ - rsync
environment:
version: 7
slaves:
- - deploy@baikal.cyberia.club
-image: alpine/edge
-packages:
-- rsync
-secrets:
-# deploy@baikal.cyberia.club
-- aac6b8d1-65c1-4d7f-862f-094716b800e3
+ - deploy@baikal.cyberia.club
sources:
-- https://git.cyberia.club/services/capsul-images
-tasks:
-- genimg: 'cd capsul-images/centos
-
- sudo ./build $version'
-- deploy: "cd capsul-images/centos\necho \"StrictHostKeyChecking=no\"\
- \ >> ~/.ssh/config\nfor server in \"${slaves[@]}\"\ndo\n ssh $server mkdir -p\
- \ /tank/img/centos/$version\n rsync -rzP $version/root.img.qcow2 \\\n\
- \ ${server}:/tank/img/centos/$version/new_root.img.qcow2\n ssh\
- \ $server \\\n mv /tank/img/centos/$version/new_root.img.qcow2\
- \ \\\n /tank/img/centos/$version/root.img.qcow2\ndone"
+ - https://git.cyberia.club/services/capsul-images
+secrets:
+ # deploy@baikal.cyberia.club
+ - aac6b8d1-65c1-4d7f-862f-094716b800e3
triggers:
-- action: email
- condition: failure
- to: ops <ops@cyberia.club>
+ - action: email
+ condition: failure
+ to: ops <ops@cyberia.club>
+tasks:
+ - genimg: |
+ cd capsul-images/centos
+ sudo ./build $version
+ - deploy: |
+ cd capsul-images/centos
+ echo "StrictHostKeyChecking=no" >> ~/.ssh/config
+ for server in "${slaves[@]}"
+ do
+ ssh $server mkdir -p /tank/img/centos/$version
+ rsync -rzP $version/root.img.qcow2 \
+ ${server}:/tank/img/centos/$version/new_root.img.qcow2
+ ssh $server \
+ mv /tank/img/centos/$version/new_root.img.qcow2 \
+ /tank/img/centos/$version/root.img.qcow2
+ done
diff --git a/builds/monthly/capsul-centos-8.yaml b/builds/monthly/capsul-centos-8.yaml
index 22db49e..f6c792d 100644
--- a/builds/monthly/capsul-centos-8.yaml
+++ b/builds/monthly/capsul-centos-8.yaml
@@ -1,29 +1,34 @@
# this builds the capsul centos 10 template img
-
+image: alpine/edge
+packages:
+ - rsync
environment:
version: 8
slaves:
- - deploy@baikal.cyberia.club
-image: alpine/edge
-packages:
-- rsync
-secrets:
-# deploy@baikal.cyberia.club
-- aac6b8d1-65c1-4d7f-862f-094716b800e3
+ - deploy@baikal.cyberia.club
sources:
-- https://git.cyberia.club/services/capsul-images
-tasks:
-- genimg: 'cd capsul-images/centos
-
- sudo ./build $version'
-- deploy: "cd capsul-images/centos\necho \"StrictHostKeyChecking=no\"\
- \ >> ~/.ssh/config\nfor server in \"${slaves[@]}\"\ndo\n ssh $server mkdir -p\
- \ /tank/img/centos/$version\n rsync -rzP $version/root.img.qcow2 \\\n\
- \ ${server}:/tank/img/centos/$version/new_root.img.qcow2\n ssh\
- \ $server \\\n mv /tank/img/centos/$version/new_root.img.qcow2\
- \ \\\n /tank/img/centos/$version/root.img.qcow2\ndone"
+ - https://git.cyberia.club/services/capsul-images
+secrets:
+ # deploy@baikal.cyberia.club
+ - aac6b8d1-65c1-4d7f-862f-094716b800e3
triggers:
-- action: email
- condition: failure
- to: ops <ops@cyberia.club>
+ - action: email
+ condition: failure
+ to: ops <ops@cyberia.club>
+tasks:
+ - genimg: |
+ cd capsul-images/centos
+ sudo ./build $version
+ - deploy: |
+ cd capsul-images/centos
+ echo "StrictHostKeyChecking=no" >> ~/.ssh/config
+ for server in "${slaves[@]}"
+ do
+ ssh $server mkdir -p /tank/img/centos/$version
+ rsync -rzP $version/root.img.qcow2 \
+ ${server}:/tank/img/centos/$version/new_root.img.qcow2
+ ssh $server \
+ mv /tank/img/centos/$version/new_root.img.qcow2 \
+ /tank/img/centos/$version/root.img.qcow2
+ done
diff --git a/builds/weekly/alpine-latest.yaml b/builds/weekly/alpine-latest.yaml
index ce948f5..1706dab 100644
--- a/builds/weekly/alpine-latest.yaml
+++ b/builds/weekly/alpine-latest.yaml
@@ -1,39 +1,52 @@
# this build is for a runner VM that is accessible via
# builds.cyberia.club
+image: alpine/edge
+packages:
+ - e2fsprogs
+ - qemu-img
+ - qemu-system-x86_64
+ - rsync
+ - sfdisk
+sources:
+ - https://git.sr.ht/~sircmpwn/builds.sr.ht
environment:
arch: x86_64
release: latest
slaves:
- - deploy@192.168.3.3
- - deploy@192.168.3.4
-image: alpine/edge
-packages:
-- e2fsprogs
-- qemu-img
-- qemu-system-x86_64
-- rsync
-- sfdisk
+ - deploy@192.168.3.3
+ - deploy@192.168.3.4
secrets:
-# deploy@muninn.cyberia.club
-- 122dfa69-09f4-433f-85d0-5c97c010e08c
-sources:
-- https://git.sr.ht/~sircmpwn/builds.sr.ht
-tasks:
-- genimg: 'cd builds.sr.ht/images/alpine/$release
-
- sudo ./genimg $arch'
-- kvm: "if grep -i amd /proc/cpuinfo\nthen\n sudo modprobe kvm_amd\nelse\n sudo\
- \ modprobe kvm_intel\nfi\nsleep 1\nsudo chown build:build /dev/kvm"
-- sanity-check: 'cd builds.sr.ht
-
- MEMORY=1024 ./images/control alpine/$release sanity-check'
-- deploy: "cd builds.sr.ht/images/alpine/$release\necho \"StrictHostKeyChecking=no\"\
- \ >> ~/.ssh/config\nfor server in \"${slaves[@]}\"\ndo\n ssh $server mkdir -p\
- \ /var/lib/images/alpine/$release/$arch\n rsync -rzP $arch/root.img.qcow2 \\\n\
- \ ${server}:/var/lib/images/alpine/$release/$arch/new_root.img.qcow2\n ssh\
- \ $server \\\n mv /var/lib/images/alpine/$release/$arch/new_root.img.qcow2\
- \ \\\n /var/lib/images/alpine/$release/$arch/root.img.qcow2\ndone"
+ # deploy@muninn.cyberia.club & deploy@dredd.cyberia.club
+ - 122dfa69-09f4-433f-85d0-5c97c010e08c
triggers:
-- action: email
- condition: failure
- to: j3s <j3s@c3f.net>
+ - action: email
+ condition: failure
+ to: j3s <j3s@c3f.net>
+tasks:
+ - genimg: |
+ cd builds.sr.ht/images/alpine/$release
+ sudo ./genimg $arch
+ - kvm: |
+ if grep -i amd /proc/cpuinfo
+ then
+ sudo modprobe kvm_amd
+ else
+ sudo modprobe kvm_intel
+ fi
+ sleep 1
+ sudo chown build:build /dev/kvm
+ - sanity-check: |
+ cd builds.sr.ht
+ MEMORY=1024 ./images/control alpine/$release sanity-check
+ - deploy: |
+ cd builds.sr.ht/images/alpine/$release
+ echo "StrictHostKeyChecking=no" >> ~/.ssh/config
+ for server in "${slaves[@]}"
+ do
+ ssh $server mkdir -p /var/lib/images/alpine/$release/$arch
+ rsync -rzP $arch/root.img.qcow2 \
+ ${server}:/var/lib/images/alpine/$release/$arch/new_root.img.qcow2
+ ssh $server \
+ mv /var/lib/images/alpine/$release/$arch/new_root.img.qcow2 \
+ /var/lib/images/alpine/$release/$arch/root.img.qcow2
+ done
diff --git a/builds/weekly/debian-oldstable.yaml b/builds/weekly/debian-oldstable.yaml
index c49d4e2..e7fad58 100644
--- a/builds/weekly/debian-oldstable.yaml
+++ b/builds/weekly/debian-oldstable.yaml
@@ -1,55 +1,96 @@
# this build is for a runner VM that is accessible via
# builds.cyberia.club
+image: debian/unstable
+packages:
+ - debootstrap
+ - e2fsprogs
+ - qemu-user-static
+ - binfmt-support
+ - rsync
+ - extlinux
+sources:
+ - https://git.sr.ht/~sircmpwn/builds.sr.ht
environment:
arch: amd64
release: oldstable
slaves:
- - deploy@192.168.3.3
- - deploy@192.168.3.4
-image: debian/unstable
-packages:
-- debootstrap
-- e2fsprogs
-- qemu-user-static
-- binfmt-support
-- rsync
-- extlinux
+ - deploy@192.168.3.3
+ - deploy@192.168.3.4
secrets:
-- 122dfa69-09f4-433f-85d0-5c97c010e08c
-sources:
-- https://git.sr.ht/~sircmpwn/builds.sr.ht
-tasks:
-- genimg: "cd builds.sr.ht\ncd images/debian/$release\ncase \"$arch\" in\n arm64)\n\
- \ qpkg=arm\n ;;\n amd64)\n qpkg=x86\n ;;\n ppc64el)\n\
- \ qpkg=ppc\n ;;\nesac\nsudo apt install -y qemu-system-\"$qpkg\"\
- \nsudo ./genimg $arch"
-- sanity-check: "cd builds.sr.ht\nif [ -e /dev/kvm ] && [ \"$(uname -m)\" = \"x86_64\"\
- \ ] && [ \"$arch\" = \"amd64\" ]\nthen\n # Debian does not have a kvm group\
- \ so we just gotta do it this way\n sudo chown build:build /dev/kvm\n MEMORY=1024\
- \ ./images/control debian/$release sanity-check\nelse\n echo \"KVM unavailable,\
- \ skipping sanity check\"\nfi"
-- deploy: "cd builds.sr.ht/images/debian/$release\necho \"StrictHostKeyChecking=no\"\
- \ >> ~/.ssh/config\nfor server in \"${slaves[@]}\"\ndo\n ssh $server mkdir -p\
- \ /var/lib/images/debian/$release/$arch\n rsync -rzP $arch/root.img.qcow2 \\\n\
- \ ${server}:/var/lib/images/debian/$release/$arch/new_root.img.qcow2\n case\
- \ \"$arch\" in\n arm64)\n rsync -rzP $arch/vmlinuz \\\n \
- \ ${server}:/var/lib/images/debian/$release/$arch/vmlinuz.new\n rsync\
- \ -rzP $arch/initrd.img \\\n ${server}:/var/lib/images/debian/$release/$arch/initrd.img.new\n\
- \ ;;\n ppc*)\n rsync -rzP $arch/vmlinux \\\n \
- \ ${server}:/var/lib/images/debian/$release/$arch/vmlinux.new\n rsync\
- \ -rzP $arch/initrd.img \\\n ${server}:/var/lib/images/debian/$release/$arch/initrd.img.new\n\
- \ ;;\n esac\n ssh $server \\\n mv /var/lib/images/debian/$release/$arch/new_root.img.qcow2\
- \ \\\n /var/lib/images/debian/$release/$arch/root.img.qcow2\n case \"$arch\"\
- \ in\n arm64)\n ssh $server \\\n mv /var/lib/images/debian/$release/$arch/vmlinuz.new\
- \ \\\n /var/lib/images/debian/$release/$arch/vmlinuz\n \
- \ ssh $server \\\n mv /var/lib/images/debian/$release/$arch/initrd.img.new\
- \ \\\n /var/lib/images/debian/$release/$arch/initrd.img\n \
- \ ;;\n ppc*)\n ssh $server \\\n mv /var/lib/images/debian/$release/$arch/vmlinux.new\
- \ \\\n /var/lib/images/debian/$release/$arch/vmlinux\n \
- \ ssh $server \\\n mv /var/lib/images/debian/$release/$arch/initrd.img.new\
- \ \\\n /var/lib/images/debian/$release/$arch/initrd.img\n \
- \ ;;\n esac\ndone"
+ - 122dfa69-09f4-433f-85d0-5c97c010e08c
triggers:
-- action: email
- condition: failure
- to: j3s <j3s@c3f.net>
+ - action: email
+ condition: failure
+ to: j3s <j3s@c3f.net>
+tasks:
+ - genimg: |
+ cd builds.sr.ht
+ cd images/debian/$release
+ case "$arch" in
+ arm64)
+ qpkg=arm
+ ;;
+ amd64)
+ qpkg=x86
+ ;;
+ ppc64el)
+ qpkg=ppc
+ ;;
+ esac
+ sudo apt install -y qemu-system-"$qpkg"
+ sudo apt install qemu-utils
+ sudo ./genimg $arch
+ - sanity-check: |
+ cd builds.sr.ht
+ if [ -e /dev/kvm ] && [ "$(uname -m)" = "x86_64" ] && [ "$arch" = "amd64" ]
+ then
+ # Debian does not have a kvm group so we just gotta do it this way
+ sudo chown build:build /dev/kvm
+ MEMORY=1024 ./images/control debian/$release sanity-check
+ else
+ echo "KVM unavailable, skipping sanity check"
+ fi
+ - deploy: |
+ cd builds.sr.ht/images/debian/$release
+ echo "StrictHostKeyChecking=no" >> ~/.ssh/config
+ for server in "${slaves[@]}"
+ do
+ ssh $server mkdir -p /var/lib/images/debian/$release/$arch
+ rsync -rzP $arch/root.img.qcow2 \
+ ${server}:/var/lib/images/debian/$release/$arch/new_root.img.qcow2
+ case "$arch" in
+ arm64)
+ rsync -rzP $arch/vmlinuz \
+ ${server}:/var/lib/images/debian/$release/$arch/vmlinuz.new
+ rsync -rzP $arch/initrd.img \
+ ${server}:/var/lib/images/debian/$release/$arch/initrd.img.new
+ ;;
+ ppc*)
+ rsync -rzP $arch/vmlinux \
+ ${server}:/var/lib/images/debian/$release/$arch/vmlinux.new
+ rsync -rzP $arch/initrd.img \
+ ${server}:/var/lib/images/debian/$release/$arch/initrd.img.new
+ ;;
+ esac
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/new_root.img.qcow2 \
+ /var/lib/images/debian/$release/$arch/root.img.qcow2
+ case "$arch" in
+ arm64)
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/vmlinuz.new \
+ /var/lib/images/debian/$release/$arch/vmlinuz
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/initrd.img.new \
+ /var/lib/images/debian/$release/$arch/initrd.img
+ ;;
+ ppc*)
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/vmlinux.new \
+ /var/lib/images/debian/$release/$arch/vmlinux
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/initrd.img.new \
+ /var/lib/images/debian/$release/$arch/initrd.img
+ ;;
+ esac
+ done
diff --git a/builds/weekly/debian-sid.yaml b/builds/weekly/debian-sid.yaml
index d7dd196..7e2d903 100644
--- a/builds/weekly/debian-sid.yaml
+++ b/builds/weekly/debian-sid.yaml
@@ -1,55 +1,96 @@
# this build is for a runner VM that is accessible via
# builds.cyberia.club
+image: debian/unstable
+packages:
+ - debootstrap
+ - e2fsprogs
+ - qemu-user-static
+ - binfmt-support
+ - rsync
+ - extlinux
+sources:
+ - https://git.sr.ht/~sircmpwn/builds.sr.ht
environment:
arch: amd64
release: sid
slaves:
- - deploy@192.168.3.3
- - deploy@192.168.3.4
-image: debian/unstable
-packages:
-- debootstrap
-- e2fsprogs
-- qemu-user-static
-- binfmt-support
-- rsync
-- extlinux
+ - deploy@192.168.3.3
+ - deploy@192.168.3.4
secrets:
-- 122dfa69-09f4-433f-85d0-5c97c010e08c
-sources:
-- https://git.sr.ht/~sircmpwn/builds.sr.ht
-tasks:
-- genimg: "cd builds.sr.ht\ncd images/debian/$release\ncase \"$arch\" in\n arm64)\n\
- \ qpkg=arm\n ;;\n amd64)\n qpkg=x86\n ;;\n ppc64el)\n\
- \ qpkg=ppc\n ;;\nesac\nsudo apt install -y qemu-system-\"$qpkg\"\
- \nsudo ./genimg $arch"
-- sanity-check: "cd builds.sr.ht\nif [ -e /dev/kvm ] && [ \"$(uname -m)\" = \"x86_64\"\
- \ ] && [ \"$arch\" = \"amd64\" ]\nthen\n # Debian does not have a kvm group\
- \ so we just gotta do it this way\n sudo chown build:build /dev/kvm\n MEMORY=1024\
- \ ./images/control debian/$release sanity-check\nelse\n echo \"KVM unavailable,\
- \ skipping sanity check\"\nfi"
-- deploy: "cd builds.sr.ht/images/debian/$release\necho \"StrictHostKeyChecking=no\"\
- \ >> ~/.ssh/config\nfor server in \"${slaves[@]}\"\ndo\n ssh $server mkdir -p\
- \ /var/lib/images/debian/$release/$arch\n rsync -rzP $arch/root.img.qcow2 \\\n\
- \ ${server}:/var/lib/images/debian/$release/$arch/new_root.img.qcow2\n case\
- \ \"$arch\" in\n arm64)\n rsync -rzP $arch/vmlinuz \\\n \
- \ ${server}:/var/lib/images/debian/$release/$arch/vmlinuz.new\n rsync\
- \ -rzP $arch/initrd.img \\\n ${server}:/var/lib/images/debian/$release/$arch/initrd.img.new\n\
- \ ;;\n ppc*)\n rsync -rzP $arch/vmlinux \\\n \
- \ ${server}:/var/lib/images/debian/$release/$arch/vmlinux.new\n rsync\
- \ -rzP $arch/initrd.img \\\n ${server}:/var/lib/images/debian/$release/$arch/initrd.img.new\n\
- \ ;;\n esac\n ssh $server \\\n mv /var/lib/images/debian/$release/$arch/new_root.img.qcow2\
- \ \\\n /var/lib/images/debian/$release/$arch/root.img.qcow2\n case \"$arch\"\
- \ in\n arm64)\n ssh $server \\\n mv /var/lib/images/debian/$release/$arch/vmlinuz.new\
- \ \\\n /var/lib/images/debian/$release/$arch/vmlinuz\n \
- \ ssh $server \\\n mv /var/lib/images/debian/$release/$arch/initrd.img.new\
- \ \\\n /var/lib/images/debian/$release/$arch/initrd.img\n \
- \ ;;\n ppc*)\n ssh $server \\\n mv /var/lib/images/debian/$release/$arch/vmlinux.new\
- \ \\\n /var/lib/images/debian/$release/$arch/vmlinux\n \
- \ ssh $server \\\n mv /var/lib/images/debian/$release/$arch/initrd.img.new\
- \ \\\n /var/lib/images/debian/$release/$arch/initrd.img\n \
- \ ;;\n esac\ndone"
+ - 122dfa69-09f4-433f-85d0-5c97c010e08c
triggers:
-- action: email
- condition: failure
- to: j3s <j3s@c3f.net>
+ - action: email
+ condition: failure
+ to: j3s <j3s@c3f.net>
+tasks:
+ - genimg: |
+ cd builds.sr.ht
+ cd images/debian/$release
+ case "$arch" in
+ arm64)
+ qpkg=arm
+ ;;
+ amd64)
+ qpkg=x86
+ ;;
+ ppc64el)
+ qpkg=ppc
+ ;;
+ esac
+ sudo apt install -y qemu-system-"$qpkg"
+ sudo apt install qemu-utils
+ sudo ./genimg $arch
+ - sanity-check: |
+ cd builds.sr.ht
+ if [ -e /dev/kvm ] && [ "$(uname -m)" = "x86_64" ] && [ "$arch" = "amd64" ]
+ then
+ # Debian does not have a kvm group so we just gotta do it this way
+ sudo chown build:build /dev/kvm
+ MEMORY=1024 ./images/control debian/$release sanity-check
+ else
+ echo "KVM unavailable, skipping sanity check"
+ fi
+ - deploy: |
+ cd builds.sr.ht/images/debian/$release
+ echo "StrictHostKeyChecking=no" >> ~/.ssh/config
+ for server in "${slaves[@]}"
+ do
+ ssh $server mkdir -p /var/lib/images/debian/$release/$arch
+ rsync -rzP $arch/root.img.qcow2 \
+ ${server}:/var/lib/images/debian/$release/$arch/new_root.img.qcow2
+ case "$arch" in
+ arm64)
+ rsync -rzP $arch/vmlinuz \
+ ${server}:/var/lib/images/debian/$release/$arch/vmlinuz.new
+ rsync -rzP $arch/initrd.img \
+ ${server}:/var/lib/images/debian/$release/$arch/initrd.img.new
+ ;;
+ ppc*)
+ rsync -rzP $arch/vmlinux \
+ ${server}:/var/lib/images/debian/$release/$arch/vmlinux.new
+ rsync -rzP $arch/initrd.img \
+ ${server}:/var/lib/images/debian/$release/$arch/initrd.img.new
+ ;;
+ esac
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/new_root.img.qcow2 \
+ /var/lib/images/debian/$release/$arch/root.img.qcow2
+ case "$arch" in
+ arm64)
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/vmlinuz.new \
+ /var/lib/images/debian/$release/$arch/vmlinuz
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/initrd.img.new \
+ /var/lib/images/debian/$release/$arch/initrd.img
+ ;;
+ ppc*)
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/vmlinux.new \
+ /var/lib/images/debian/$release/$arch/vmlinux
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/initrd.img.new \
+ /var/lib/images/debian/$release/$arch/initrd.img
+ ;;
+ esac
+ done
diff --git a/builds/weekly/debian-stable.yaml b/builds/weekly/debian-stable.yaml
index d1d1024..941941b 100644
--- a/builds/weekly/debian-stable.yaml
+++ b/builds/weekly/debian-stable.yaml
@@ -1,55 +1,96 @@
# this build is for a runner VM that is accessible via
# builds.cyberia.club
+image: debian/unstable
+packages:
+ - debootstrap
+ - e2fsprogs
+ - qemu-user-static
+ - binfmt-support
+ - rsync
+ - extlinux
+sources:
+ - https://git.sr.ht/~sircmpwn/builds.sr.ht
environment:
arch: amd64
release: stable
slaves:
- - deploy@192.168.3.3
- - deploy@192.168.3.4
-image: debian/unstable
-packages:
-- debootstrap
-- e2fsprogs
-- qemu-user-static
-- binfmt-support
-- rsync
-- extlinux
+ - deploy@192.168.3.3
+ - deploy@192.168.3.4
secrets:
-- 122dfa69-09f4-433f-85d0-5c97c010e08c
-sources:
-- https://git.sr.ht/~sircmpwn/builds.sr.ht
-tasks:
-- genimg: "cd builds.sr.ht\ncd images/debian/$release\ncase \"$arch\" in\n arm64)\n\
- \ qpkg=arm\n ;;\n amd64)\n qpkg=x86\n ;;\n ppc64el)\n\
- \ qpkg=ppc\n ;;\nesac\nsudo apt install -y qemu-system-\"$qpkg\"\
- \nsudo ./genimg $arch"
-- sanity-check: "cd builds.sr.ht\nif [ -e /dev/kvm ] && [ \"$(uname -m)\" = \"x86_64\"\
- \ ] && [ \"$arch\" = \"amd64\" ]\nthen\n # Debian does not have a kvm group\
- \ so we just gotta do it this way\n sudo chown build:build /dev/kvm\n MEMORY=1024\
- \ ./images/control debian/$release sanity-check\nelse\n echo \"KVM unavailable,\
- \ skipping sanity check\"\nfi"
-- deploy: "cd builds.sr.ht/images/debian/$release\necho \"StrictHostKeyChecking=no\"\
- \ >> ~/.ssh/config\nfor server in \"${slaves[@]}\"\ndo\n ssh $server mkdir -p\
- \ /var/lib/images/debian/$release/$arch\n rsync -rzP $arch/root.img.qcow2 \\\n\
- \ ${server}:/var/lib/images/debian/$release/$arch/new_root.img.qcow2\n case\
- \ \"$arch\" in\n arm64)\n rsync -rzP $arch/vmlinuz \\\n \
- \ ${server}:/var/lib/images/debian/$release/$arch/vmlinuz.new\n rsync\
- \ -rzP $arch/initrd.img \\\n ${server}:/var/lib/images/debian/$release/$arch/initrd.img.new\n\
- \ ;;\n ppc*)\n rsync -rzP $arch/vmlinux \\\n \
- \ ${server}:/var/lib/images/debian/$release/$arch/vmlinux.new\n rsync\
- \ -rzP $arch/initrd.img \\\n ${server}:/var/lib/images/debian/$release/$arch/initrd.img.new\n\
- \ ;;\n esac\n ssh $server \\\n mv /var/lib/images/debian/$release/$arch/new_root.img.qcow2\
- \ \\\n /var/lib/images/debian/$release/$arch/root.img.qcow2\n case \"$arch\"\
- \ in\n arm64)\n ssh $server \\\n mv /var/lib/images/debian/$release/$arch/vmlinuz.new\
- \ \\\n /var/lib/images/debian/$release/$arch/vmlinuz\n \
- \ ssh $server \\\n mv /var/lib/images/debian/$release/$arch/initrd.img.new\
- \ \\\n /var/lib/images/debian/$release/$arch/initrd.img\n \
- \ ;;\n ppc*)\n ssh $server \\\n mv /var/lib/images/debian/$release/$arch/vmlinux.new\
- \ \\\n /var/lib/images/debian/$release/$arch/vmlinux\n \
- \ ssh $server \\\n mv /var/lib/images/debian/$release/$arch/initrd.img.new\
- \ \\\n /var/lib/images/debian/$release/$arch/initrd.img\n \
- \ ;;\n esac\ndone"
+ - 122dfa69-09f4-433f-85d0-5c97c010e08c
triggers:
-- action: email
- condition: failure
- to: j3s <j3s@c3f.net>
+ - action: email
+ condition: failure
+ to: j3s <j3s@c3f.net>
+tasks:
+ - genimg: |
+ cd builds.sr.ht
+ cd images/debian/$release
+ case "$arch" in
+ arm64)
+ qpkg=arm
+ ;;
+ amd64)
+ qpkg=x86
+ ;;
+ ppc64el)
+ qpkg=ppc
+ ;;
+ esac
+ sudo apt install -y qemu-system-"$qpkg"
+ sudo apt install qemu-utils
+ sudo ./genimg $arch
+ - sanity-check: |
+ cd builds.sr.ht
+ if [ -e /dev/kvm ] && [ "$(uname -m)" = "x86_64" ] && [ "$arch" = "amd64" ]
+ then
+ # Debian does not have a kvm group so we just gotta do it this way
+ sudo chown build:build /dev/kvm
+ MEMORY=1024 ./images/control debian/$release sanity-check
+ else
+ echo "KVM unavailable, skipping sanity check"
+ fi
+ - deploy: |
+ cd builds.sr.ht/images/debian/$release
+ echo "StrictHostKeyChecking=no" >> ~/.ssh/config
+ for server in "${slaves[@]}"
+ do
+ ssh $server mkdir -p /var/lib/images/debian/$release/$arch
+ rsync -rzP $arch/root.img.qcow2 \
+ ${server}:/var/lib/images/debian/$release/$arch/new_root.img.qcow2
+ case "$arch" in
+ arm64)
+ rsync -rzP $arch/vmlinuz \
+ ${server}:/var/lib/images/debian/$release/$arch/vmlinuz.new
+ rsync -rzP $arch/initrd.img \
+ ${server}:/var/lib/images/debian/$release/$arch/initrd.img.new
+ ;;
+ ppc*)
+ rsync -rzP $arch/vmlinux \
+ ${server}:/var/lib/images/debian/$release/$arch/vmlinux.new
+ rsync -rzP $arch/initrd.img \
+ ${server}:/var/lib/images/debian/$release/$arch/initrd.img.new
+ ;;
+ esac
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/new_root.img.qcow2 \
+ /var/lib/images/debian/$release/$arch/root.img.qcow2
+ case "$arch" in
+ arm64)
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/vmlinuz.new \
+ /var/lib/images/debian/$release/$arch/vmlinuz
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/initrd.img.new \
+ /var/lib/images/debian/$release/$arch/initrd.img
+ ;;
+ ppc*)
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/vmlinux.new \
+ /var/lib/images/debian/$release/$arch/vmlinux
+ ssh $server \
+ mv /var/lib/images/debian/$release/$arch/initrd.img.new \
+ /var/lib/images/debian/$release/$arch/initrd.img
+ ;;
+ esac
+ done