Skip to content

Commit

Permalink
Merge pull request #377 from vfreex/declarative-not-using-container-step
Browse files Browse the repository at this point in the history
[JENKINS-53422] Declarative: do not wrap steps with `container` statement unless default container is changed
  • Loading branch information
Vlatombe authored Oct 17, 2018
2 parents d68a234 + f188a8c commit 094b0ae
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,14 @@ public class KubernetesDeclarativeAgentScript extends DeclarativeAgentScript<Kub
}

// call the main body
script.container(container) {
if (container == 'jnlp') {
// If default container is not changed by the pipeline user,
// do not enclose the body with a `container` statement.
body.call()
} else {
script.container(container) {
body.call()
}
}
}.call()
}
Expand Down

0 comments on commit 094b0ae

Please sign in to comment.