-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins 2.11
vSphere Plugin 2.13
the following code is used to trigger vSphere plugin to create a vm from template using pipline
vSphere buildStep: [$class: 'Clone', clone: "${vm_name}", cluster: "${cluster}", datastore: "${datastore}", linkedClone: false, powerOn: false, resourcePool: '<ressources>', sourceName: "${templatename}"], serverName: '<servername>'
after vm will be successfully cloned the following error is triggert and fails the jenkins job
java.lang.IllegalArgumentException: Null value not allowed as an environment variable: VSPHERE_IP at hudson.EnvVars.put(EnvVars.java:356) at org.jenkinsci.plugins.workflow.vSphereStep$vSphereExecution.run(vSphereStep.java:129) at org.jenkinsci.plugins.workflow.vSphereStep$vSphereExecution.run(vSphereStep.java:94) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:49) at hudson.security.ACL.impersonate(ACL.java:213) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
a manual overwrite with
env.VSPHERE_IP = "${ip}"
before triggering the job does not help, the plugin seems to overwrite it with a NULL and cause the exception above