Skip to content

Commit

Permalink
Run empty stages for conditionally-skipped stages.
Browse files Browse the repository at this point in the history
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 b7c196b
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -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) {
Expand Down

0 comments on commit b7c196b

Please sign in to comment.