A custom GitLab Runner executor for running CI/CD jobs inside ephemeral Proxmox VMs.
Each job gets a fresh VM clone, runs isolated, and is cleaned up automatically.
Use a VM template with:
qemu-guest-agentinstalled and running- SSH enabled
- Password-based login for initial runner access
For full template hardening and conversion steps, see docs/advanced-usage.md.
# Linux amd64
curl -L -o gitlab-proxmox-executor \
https://github.com/wibu-systems/gitlab-proxmox-executor/releases/latest/download/gitlab-proxmox-executor-linux-amd64
chmod +x gitlab-proxmox-executor
sudo mv gitlab-proxmox-executor /usr/local/bin/# Install GitLab Runner
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash
sudo apt-get update
sudo apt-get install -y gitlab-runner
# Ensure config directory exists
sudo mkdir -p /etc/gitlab-runnerCreate or update /etc/gitlab-runner/config.toml with the example below, then restart:
sudo systemctl restart gitlab-runner
sudo systemctl status gitlab-runner --no-pagerUse the dedicated deployment guide in deploy/kubernetes/README.md.
concurrent = 2
[[runners]]
name = "proxmox-runner"
url = "https://gitlab.example.com"
token = "YOUR_TOKEN"
executor = "custom"
tags = ["proxmox"]
[runners.custom]
config_exec = "gitlab-proxmox-executor"
config_args = ["config"]
prepare_exec = "gitlab-proxmox-executor"
prepare_args = ["prepare"]
run_exec = "gitlab-proxmox-executor"
run_args = ["run"]
cleanup_exec = "gitlab-proxmox-executor"
cleanup_args = ["cleanup"]
environment = [
"PROXMOX_URL=https://proxmox.example.com:8006/api2/json",
"PROXMOX_TOKEN_ID=user@pam!token-name",
"PROXMOX_TOKEN_SECRET=CHANGE_ME",
"PROXMOX_TEMPLATE_NAME=lin-tmpl",
# Alternative:
# "PROXMOX_TEMPLATE_VMID=30002",
"PROXMOX_SSH_USER=ci",
"PROXMOX_SSH_PASS=CHANGE_ME",
"PROXMOX_KEEP_VM_ON_FAILURE=30m",
]Required environment variables:
PROXMOX_URLPROXMOX_TOKEN_IDandPROXMOX_TOKEN_SECRET(or user/password auth)PROXMOX_TEMPLATE_NAMEorPROXMOX_TEMPLATE_VMIDPROXMOX_SSH_USERandPROXMOX_SSH_PASS
See full variable reference in docs/advanced-usage.md.
test-installer:
tags:
- proxmox
variables:
PROXMOX_TEMPLATE_NAME: "lin-tmpl"
PROXMOX_NETWORK: "default"
PROXMOX_KEEP_VM_ON_FAILURE: "30m"
script:
- sudo dpkg -i ./build/myapp_1.0.0_amd64.deb
- myapp --versionFor advanced operations and troubleshooting, see:
Topics covered in the advanced guide:
- Full environment variable reference
- Network formats and clone modes
- Keep failed VMs alive and automatic cleanup
- Cluster mode behavior
- Integration test setup
- Public repository safety checklist
| Command | Description |
|---|---|
gitlab-proxmox-executor config |
Output runner config for GitLab Runner |
gitlab-proxmox-executor prepare |
Clone and start VM |
gitlab-proxmox-executor run <script> |
Execute script in VM via SSH |
gitlab-proxmox-executor cleanup |
Stop/delete VM or mark keep-alive |
gitlab-proxmox-executor cleanup-expired |
Delete expired failed VMs |
gitlab-proxmox-executor --version |
Show version |
Contributions and testing feedback are welcome.
This project distributes container images that include third-party software.
See THIRD_PARTY_NOTICES.md for a component summary and upstream license references.
Container images include third-party components under their respective licenses.
MIT - see LICENSE.
Based on gitlab-tart-executor by Cirrus Labs (MIT License).