Jenkins
Description
Jenkins CI/CD. Used to auto-deploy wiki and blog.
Configuration
Source is hosted on GitHub, mirrored to local Gitea. Jenkins polls Gitea for changes. When updated code is pulled Jenkins runs a build. When adding a new repo, make sure it is owned by the mjforan_org and has the CI team as a collaborator.
The Jenkins runner is on a VM (ci-vm) and accepts connections from the Jenkins container via SSH (host mode networking). This VM mounts the NFS share for /wiki (check /etc/fstab). There is a dummy “jenkins” user on the host machine which is used to set ownership of the /mnt/A/wiki folder. That way when the VM mounts the folder it will be assigned to the same user executing the Jenkins runner.
Links
https://github.com/mjforan/homelab-docs/blob/main/Jenkinsfile