Podman Gitlab Runner
First you need to run: - I am using volume to store gitlab runner config, if u want to can mount a simple directory. You have to mount to this point: “/etc/gitlab-runner”
Mount volume: -v podman-gitlab-runner-1:/etc/gitlab-runner
Mount directory: -v /opt/gitlab-runner:/etc/gitlab-runner
Gitlab executor always have to set to shell! - DO NOT CHANGE IT!
podman run -d –privileged –name CONTAINER_NAME -v PODMAN_SOCKET:/run/podman/podman.sock -v YOUR_VOLUME_or_DIR:/etc/gitlab-runner adamkoro/podman-gitlab-runner:latest
Register to Gitlab:
podman exec -it CONTAINER_NAME gitlab-runner register -n –url GIT_URL –registration-token=YOUR_TOKEN –executor shell –description “YOUR_DESC” –tag-list “YOUR_TAGS”
Implement in CD/CD
When you are implemeting in CI/CD, you have to set podman-remote instead of podman in “script” section.