diff --git a/src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplate.java b/src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplate.java index 9fe78ec3f8..e9ff7e3983 100644 --- a/src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplate.java +++ b/src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplate.java @@ -682,11 +682,16 @@ private String getContainersDescriptionForLogging() { } sb.append("\n"); } + if (StringUtils.isNotBlank(getYaml())) { + sb.append("yaml:\n") + .append(getYaml()) + .append("\n"); + } return sb.toString(); } private void optionalField(StringBuilder builder, String label, String value) { - if (value != null) { + if (StringUtils.isNotBlank(value)) { if (builder.length() > 0) { builder.append(", "); }