Add jails executor
Description
Currently the commonly used executor that will work on FreeBSD is shell
. This causes a problem since commands will be executed on host instead of a contained environment.
Proposal
gitlab-runner can solve this issue by utilizing jails which is a container system that's native to FreeBSD and DragonFlyBSD.
When the runner takes the job, it can easily create a new jail and run the commands in the contained environment.
Currently, the closest thing we can get to this is by using the shell executor and launch the jail manually in the CI configuration and launch the commands with jexec as seen in the reference below.
Links to related issues and merge requests / references
- Current CI configuration to get jails: yzgyyang/package_manager@7c8dae39
- jail(8)
- https://www.freebsd.org/doc/handbook/jails-ezjail.html
- Make jails without ezjail: https://clinta.github.io/freebsd-jails-the-hard-way/