Simple CI/CD for Arch Linux packages with optional support to push successfull built PKGBUILD
repos to the AUR, written in Python with Django and Docker.
Packages get built in clean Docker containers, afterwards the resulting packages get added to the local repo for the CI/CD, so other packages can depend on it.
Tested with > 300 AUR packages I maintain.
Preperations: Docker and a webserver with reverse proxying capabilities, e. g. nginx
git clone https://github.com/bionade24/abs_cd.git
docker-compose up --build -d
Config webserver to proxy gunicorn and serve static files, defaultly under /srv/abs_cd/staticfiles
(nginx example config)
(Optionally add private ssh key for aur push)
Per default, the config and data is stored under /var/local/abs_cd/
.
Behaves like any Django App, so the Django documentation will help you with most things. (e.g. django settings.py is under abs_cd/abs_cd/settings.py and call python manage.py createsuperuser
in the container to create admin user)
The cronjob checking for updated repos is in the settings.py, too.
Set DEBUG=True
in data/settings.ini
to allow django serving static files.
Podman: Mount the podman socket instead, you can also manipulate the socket URL in the django container under data/settings.ini
. Currently, the dev version of podman-compose is necessary. An example compose yaml for rootless mode can be found here: bionade24#7 (comment)
- Either mount
abs_cd_local-repo
in a second container. Please be aware that then your pacman.conf repo entry has to be calledabs_cd_local-repo
everywhere or you have to rename your repo entirely. And packages aren't signed so please use https for intergrity. - Copy them:
docker cp abs_cd_abs_cd_1:/repo PATH && rm PATH/repo/abs_cd-local.*
. For a repo, I recommend you to use repo-add_and_sign.