sys-kernel/xanmod-kernel: add CI for package building
As already announced by two closed merge requests I tried to implement a pipeline stage to automatically build and deploy xanmod-kernel
in preparation for a xanmod-kernel-bin
package as requested in #39.
This is done by two jobs, build and deploy, which will only run if ebuild files in the package directory changes and a merge request is opened.
The build job will:
- create
PKGDIR
, which is set as global variable - run added build script, which creates a list of changed files using
git-diff
and runsebuild
with each of those files - add
PKGDIR
as artifact for deploy job
To provide a tool chain for package creation a modified gentoo-stage3 image is used.
The deploy job will:
- add ssh private key to ssh-agent and add given server to
known_hosts
- run added deploy script to
scp
all.gpkg.tar
files from artifacts to destination server
In order to run properly the following gitlab variables must be set:
-
KERNEL_SSH_ADDRESS
- address or ip of the deploy server -
KERNEL_SSH_BASE_DIR
- web/deploy servers base directory -
KERNEL_SSH_KNOWN_HOSTS
- ssh fingerprint -
KERNEL_SSH_PORT
- ssh port -
KERNEL_SSH_PRIVATE_KEY
- private ssh key used for authentication -
KERNEL_SSH_USER
- ssh user
An example instance
I know the building process of the kernel will take quite much time. For this (and also for this project at all) I could provide a runner and also the storage with web server etc. which can be found here.
Of course everything is still open and can be adapted to wishes. I appreciate every feedback and help
ML