2

I have Proxmox and Jenkins. I need to start a virtual machine on Proxmox (build slave) from a job in Jenkins.

I have a script that automatically creates and starts a VM on Proxmox and adds this VM as Jenkins slave. How to run this script from an item on Jenkins?

Alexey Vazhnov
  • 1,291
  • 17
  • 20
hetop
  • 21
  • 2
  • 1
    Can you clarify where does this script adds the VM? – afxentios Dec 21 '16 at 11:36
  • 1
    Script add VM on proxmox. I run it on proxmox machine from ssh. – hetop Dec 21 '16 at 11:51
  • So basically you need to know how can a Jenkins job run your script (to create a VM) ? – afxentios Dec 21 '16 at 14:00
  • Jenkins can run this script and VM will be create on proxmox(from shell using **ssh root@proxmox-ip -C "script"**. But I do not know how to run the script from the item, because item requires that the build-agent have already been launched. – hetop Dec 21 '16 at 14:17

1 Answers1

0

Alternatively, there exists a Jenkins plugin that provides Proxmox integration.

You can have a look at https://plugins.jenkins.io/proxmox/

Xaqq
  • 4,308
  • 2
  • 25
  • 38