arch: null artifacts: null environment: arch: amd64 release: stable slaves: - deploy@fra01.builds.sr.ht - deploy@fra02.builds.sr.ht - deploy@patchouli2.sr.ht image: debian/unstable oauth: null packages: - debootstrap - e2fsprogs - qemu-user-static - qemu-utils - binfmt-support - rsync - syslinux-common repositories: null secrets: - fa00a8d3-7b63-42d5-8060-3bb31c3e3018 shell: null 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 # Nested KVM is often broken on Debian, run sanity check on softmmu #sudo chown build:build /dev/kvm sudo rm -f /dev/kvm MEMORY=1024 ./images/control debian/$release sanity-check' - 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" triggers: - action: email condition: failure to: ~sircmpwn/sr.ht-image-failures@lists.sr.ht