Pass stageName to dockerExecuteOnKubernetes (#1162)

This fixes configuring sidecars for the given stage when Jenkins runs
on Kubernetes and the surounding stage has passed a stageName via parameters which is different from env.STAGE_NAME.
This commit is contained in:
Stephan Aßmus
2020-02-08 12:57:55 +01:00
committed by GitHub
parent eb82851502
commit 71766be2f5
+1 -1
View File
@@ -34,7 +34,7 @@ void call(Map parameters = [:], body) {
if (Boolean.valueOf(env.ON_K8S) && containerMap.size() > 0) {
DebugReport.instance.environment.put("environment", "Kubernetes")
withEnv(["POD_NAME=${stageName}"]) {
dockerExecuteOnKubernetes(script: script, containerMap: containerMap) {
dockerExecuteOnKubernetes(script: script, containerMap: containerMap, stageName: stageName) {
executeStage(script, body, stageName, config, utils)
}
}