-
Bug
-
Resolution: Unresolved
-
Minor
-
None
Build steps that fail should declare themselves to have failed and cause the build to go red and fail.
At present, if one has a vSphere "Deploy VM from Template" step and it's told to create a new VM called "foo" from a master image "bar" (when you don't have an image "foo" or "bar") then it'll fail, but declare success.
e.g.
Console Output
Started by user a.nonymous@somewhere.com
[EnvInject] - Loading node environment variables.
Building on master in workspace /var/jenkins_home/workspace/Test
[vSphere]
[vSphere] Performing vSphere build step: "Deploy VM from template"
[vSphere] Attempting to use server configuration: "my_vsphere"
[vSphere] Deploying new vm "foo" from template "bar"
Finished: SUCCESS
I've checked the code and there are two "perform" methods.
The code should be refactored so that the parent class provides all the "perform" methods needed except one, such that the child classes (the actual build steps like Deploy.java) only have to implement one "perform" method and all other code paths in will end up calling their one-and-only "perform" method.
Once refactored, the code should be changed so that any exceptions or failures result in the build going red, with exception traces if appropriate. Anywhere where such an uncompromising attitude to failure is questionable should be enhanced with a tick-box "ignore failure" option that's ticked by default if the original code suppressed failures.
- causes
-
JENKINS-54666 vsphere plugin job succesful but VMs in vcenter not created
-
- Closed
-
- is related to
-
JENKINS-56884 Vsphere plugin : Convert Template to a VM
-
- Open
-
Came here to post the same basic issue. This issue seems to exist across many of the vSphere steps that you can use. For instance, if you try to power on a VM that doesn't exist, it will succeed when it should fail and complain that the VM to power on doesn't exist.
Likewise, I've had situations where the vSphere plug in has claimed that a VM was shut down, when it really wasn't, which played havoc with my other tests as the different VMs share a common set of USB devices.