Skip to content
Permalink
Browse files
Run empty stages for conditionally-skipped stages.
This is just a band-aid until JENKINS-38153 lands with a better
solution involving tags metadata and all that jazz, but this'll at
least make sure our execution plan matches reality for now.
  • Loading branch information
abayer committed Nov 17, 2016
1 parent 5b2c5b3 commit b7c196b003815b1ad3153629bd928c5abb662d2e
Showing with 4 additions and 4 deletions.
  1. +4 −4 ...inition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
@@ -80,10 +80,10 @@ public class ModelInterpreter implements Serializable {
for (int i = 0; i < root.stages.getStages().size(); i++) {
Stage thisStage = root.stages.getStages().get(i)
try {
runStageOrNot(thisStage) {
script.stage(thisStage.name) {
withEnvBlock(thisStage.getEnvVars()) {
if (firstError == null) {
script.stage(thisStage.name) {
runStageOrNot(thisStage) {
if (firstError == null) {
withEnvBlock(thisStage.getEnvVars()) {
inDeclarativeAgent(thisStage.agent) {
withCredentialsBlock(thisStage.getEnvCredentials()) {
toolsBlock(thisStage.agent ?: root.agent, thisStage.tools) {

0 comments on commit b7c196b

Please sign in to comment.