|
47 | 47 | import org.csanchez.jenkins.plugins.kubernetes.pipeline.PodTemplateStepExecution;
|
48 | 48 | import org.csanchez.jenkins.plugins.kubernetes.pod.decorator.PodDecorator;
|
49 | 49 | import org.csanchez.jenkins.plugins.kubernetes.volumes.PodVolume;
|
| 50 | +import org.csanchez.jenkins.plugins.kubernetes.volumes.ConfigMapVolume; |
50 | 51 | import org.kohsuke.accmod.Restricted;
|
51 | 52 | import org.kohsuke.accmod.restrictions.NoExternalUse;
|
52 | 53 |
|
|
81 | 82 | import static org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.combine;
|
82 | 83 | import static org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.isNullOrEmpty;
|
83 | 84 | import static org.csanchez.jenkins.plugins.kubernetes.PodTemplateUtils.substituteEnv;
|
84 |
| -import org.csanchez.jenkins.plugins.kubernetes.volumes.ConfigMapVolume; |
85 | 85 |
|
86 | 86 | /**
|
87 | 87 | * Helper class to build Pods from PodTemplates
|
@@ -179,10 +179,10 @@ public Pod build() {
|
179 | 179 |
|
180 | 180 | if (volume instanceof ConfigMapVolume) {
|
181 | 181 | final ConfigMapVolume configmapVolume = (ConfigMapVolume) volume;
|
182 |
| - //We need to normalize the subPath or we can end up in really hard to debug issues Just in case. |
183 |
| - final String subPath = substituteEnv(Paths.get(configmapVolume.getSubPath()).normalize().toString().replace("\\", "/")); |
184 |
| - volumeMountBuilder = volumeMountBuilder.withSubPath(subPath); |
185 |
| - } |
| 182 | + //We need to normalize the subPath or we can end up in really hard to debug issues Just in case. |
| 183 | + final String subPath = substituteEnv(Paths.get(configmapVolume.getSubPath()).normalize().toString().replace("\\", "/")); |
| 184 | + volumeMountBuilder = volumeMountBuilder.withSubPath(subPath); |
| 185 | + } |
186 | 186 | volumeMounts.put(mountPath, volumeMountBuilder.build());
|
187 | 187 | volumes.put(volumeName, volume.buildVolume(volumeName));
|
188 | 188 | i++;
|
|
0 commit comments