diff --git a/src/main/java/org/jenkinsci/plugins/vSphereCloudSlaveTemplate.java b/src/main/java/org/jenkinsci/plugins/vSphereCloudSlaveTemplate.java index 781987f..1d2bc65 100644 --- a/src/main/java/org/jenkinsci/plugins/vSphereCloudSlaveTemplate.java +++ b/src/main/java/org/jenkinsci/plugins/vSphereCloudSlaveTemplate.java @@ -727,7 +727,7 @@ private EnvVars calculateVariablesForGuestInfo(final String cloneName, final Tas addEnvVars(knownVariables, listener, Jenkins.getInstance().getGlobalNodeProperties()); addEnvVars(knownVariables, listener, this.nodeProperties); addEnvVar(knownVariables, "NODE_NAME", cloneName); - addEnvVar(knownVariables, "NODE_LABELS", getLabelSet() == null ? null : Util.join(getLabelSet(), " ")); + addEnvVar(knownVariables, "NODE_LABELS", getLabelSet() == null ? null : getLabelSet().stream().map(Object::toString).collect(Collectors.joining(" "))); addEnvVar(knownVariables, "cluster", this.cluster); addEnvVar(knownVariables, "datastore", this.datastore); addEnvVar(knownVariables, "folder", this.folder);