mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
add autobuilder to server scripts
This commit is contained in:
parent
1319910db0
commit
d9219a206f
3 changed files with 33 additions and 0 deletions
6
usr/share/archboot/server/systemd/archboot.service
Normal file
6
usr/share/archboot/server/systemd/archboot.service
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Check, build and upload archboot images at night
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/home/tobias/Arch/iso/chroots/trigger-update.sh
|
||||||
|
|
11
usr/share/archboot/server/systemd/archboot.timer
Normal file
11
usr/share/archboot/server/systemd/archboot.timer
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Runs trigger-update.sh at night
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
# Run everday at 2:00 night
|
||||||
|
OnCalendar=*-*-* 2:00:00
|
||||||
|
Unit=archboot.service
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
16
usr/share/archboot/server/trigger-update.sh
Executable file
16
usr/share/archboot/server/trigger-update.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
_ARCH="x86_64 aarch64 riscv64"
|
||||||
|
_PACKAGES="archboot bcachefs-tools btrfs-progs e2fsprogs glibc linux systemd openssh ttyd xfsprogs"
|
||||||
|
_CHROOTS="/home/tobias/Arch/iso/chroots"
|
||||||
|
cd "${_CHROOTS}" || exit 1
|
||||||
|
for i in ${_ARCH}; do
|
||||||
|
systemd-nspawn -q -D "${i}" pacman --noconfirm -Syu
|
||||||
|
for k in ${_PACKAGES}; do
|
||||||
|
if rg -qw "${k}" "${i}"/var/log/pacman.log; then
|
||||||
|
archboot-"${i}"-server-release.sh
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rm "${i}"/var/log/pacman.log
|
||||||
|
done
|
||||||
|
# vim: set ft=sh ts=4 sw=4 et:
|
Loading…
Reference in a new issue