-
Notifications
You must be signed in to change notification settings - Fork 13
Home
Use Proxmox virtual machines as slaves in Jenkins
To add a new Proxmox datacenter cloud, click on "Manage Jenkins" then "Configure System". In the "Cloud" section click "Add cloud" and select "Datacenter".
To add slaves click on "Manage Jenkins" then "Manage Nodes". Select the node type "Slave virtual machine running on a Proxmox datacenter." and enter a name for the node.
jenkins:
systemMessage: "Hello World"
agentProtocols:
- "JNLP4-connect"
clouds:
- datacenter:
hostname: "company-proxmox"
ignoreSSL: true
password: "proxmox-pass"
realm: "pve"
username: "proxmox-user"
nodes:
- virtualMachineSlave:
datacenterDescription: "proxmox-user@pve - company-proxmox"
datacenterNode: "proxmox-node"
launcher:
jnlp
labelString: "proxmox-label"
mode: EXCLUSIVE
name: "proxmox-vm"
numExecutors: 1
remoteFS: "/home/jenkins"
retentionStrategy:
demand:
idleDelay: 1
inDemandDelay: 0
revertPolicy: BEFORE_JOB
snapshotName: "proxmox-snapshot"
startVM: true
startupWaitingPeriodSeconds: 60
virtualMachineId: 42
Are defined here the parameters specific to a Proxmox VM Slave. For other parameters generic to all Slave types, please see https://javadoc.jenkins.io/hudson/model/Slave.html
The proxmox server node to use
The virtual machine identifier on Proxmox node
The snapshot to revert the virtual machine to when it is started.
The virtual machine will be started once the snapshot has been reverted. (Useful if the snapshot did not include RAM - and won't therefore be reverted in a running state).
Snapshot revert can be done after every vm launch (connect etc.) or before every job.
- AFTER_CONNECT: After connect to the virtual machine
- BEFORE_JOB: Before every job executing on the virtual machine
Time to wait after revert before connect to virtual machine