-
Notifications
You must be signed in to change notification settings - Fork 16
Develop CI Testing
Matt Simerson edited this page Nov 9, 2021
·
8 revisions
The following instructions permit testing on bare metal (painful) or VMs (awesome, if they have snapshot support) via GitLab's runner and the SSH executor. The GitLab config is already defined in the main repo.
- Fork the GitHub repo to your GitHub account
- Import your GitHub fork to your GitLab account
- Create a pipeline
- Install gitlab-runner
- Build a test VM
- Push to a gitlab branch
Install GitLab's runner on a host with network access to the test VM. The runner will get registered with GitLab and periodically poll to see if there are new jobs to run.
- Install GitLab Runner
- Register the runner with the SSH executor and identify_file property
- Using your Hypervisor of choice (or bare metal, you masochist), create a FreeBSD VM with 4GB RAM and at least 10GB of disk. During the FreeBSD install, choose no distributions and Auto ZFS partitioning.
- Configure SSH key based auth by installing a public key to /root/.ssh/authorized_keys
- Enable root logins to the VM:
sed -i'' 's/^#PermitRoot.*/PermitRootLogin without-password/' /etc/ssh/sshd_config
service sshd restart
- Install a few useful packages:
pkg update && pkg install -y sudo git-lite open-vm-tools-nox11 vim-lite bash-static
- Change root's shell to bash:
sudo chpass -s bash root
freebsd-update fetch install
portsnap fetch extract
service sendmail stop; sysrc sendmail_enable=NONE
poweroff
- snapshot the VM