Hi!
I am using a naked Windows vsphere agent for automatically testing an application installer and some acceptance test of my software.
After every run I'd like to reset the machine to have a repeatable start point for the tests.
I'm doing this like so:
lock('TestRunner') {
node('InstallerTest') {
... /* do the work */
}
vSphere buildStep: [$class: 'RevertToSnapshot', vm: 'Installermachine', snapshotName: 'Base' ], serverName: 'myvSphere'
}
However the vsphere actions seemt to keep running after the step has been finished and the lock released.
When running two test runs in a row (the test is running longer then the prior build) this ends in the second test being suddenly interrupted because the agent goes offline.
I would prefer reusing a VM compared to creating VMS from a template because that costs some time.
Any ideas?
Regards,
Christoph