cppdude opened 1 year ago
|
|||||||
Thanks for looking into OneDev. So you need a mechanism to spawn new VM per build, and destroys it after build finishes? |
|||||||
@robin Correct. I have bash scripts to do the work on a hypervisor agent using libvirt, although the exact virtualization platform could vary. GitLab has an example of a "custom executor" for this purpose at https://docs.gitlab.com/runner/executors/custom_examples/libvirt.html, but that doesn't look like enough because it is using a single base VM image when I would like jobs to be able to parameterize which VM images they want to use. |
|||||||
OneDev currently does not have that ability yet. Converting this as a feature request. |
|||||||
Robin Shen changed title 1 year ago
|
|||||||
Robin Shen changed fields 1 year ago
|
Type |
New Feature
|
Priority |
Normal
|
Assignee |
Issue Votes (0)
I'm trying to make a switch from Jenkins. I need hypervisor agent(s) to create and destroy new VMs as requested by a pipeline. The VMs spawned are connected as agents dedicated to that pipeline run, as other jobs could contaminate benchmarking and other test results (or even cause a kernel crash, as drivers are being developed). The process goes something like:
"Spawn VMs" (hypervisor agent) -> "Build" (VM agent) -> "Test" (same or different VM agent, only need "Build" done once but "Test" could be several VMs) -> "Destroy VMs" (hypervisor agent)
Maybe it's currently possible with OneDev, but I haven't been able to figure it out. There has to be an executor per VM requested as the agent selection criteria must point to a single VM, and agent selection alone (would presumably use a script?) is not available via the "Jobs" tab in the build spec. You could in theory use the REST API, but the APIs for this in particular are getting all and setting all executors which means a data race could occur in between since it's not atomic like a "Create" API would be.