Kate
Kate

Reputation: 11

Spinnaker: StageEnabled isn't recalculated when the previous jenkins stage is restarted

I have a such configuration for 2 stage in spinnaker. Wen I run and status of stage 2 is succeeded the stage 3 is skipped. But if stage 2 was failed and I restart it -> stage 2 is succeeded -> but stage 3 is run I don't understand why after restart stage 2 in this case stage 3 is run instead of skipped
Could you help with it? Should it work in such way?

 {
      "completeOtherBranchesThenFail": true,
      "continuePipeline": true,
      "failPipeline": false,
      "job": "job1",
      "master": "jenkins",
      "name": "Job1",
      "refId": "2",
      "requisiteStageRefIds": ["1"],
      "type": "jenkins"
    },
    {
      "completeOtherBranchesThenFail": true,
      "continuePipeline": true,
      "failPipeline": false,
      "judgmentInputs": [],
      "name": "Manual Ignore Job1",
      "refId": "3",
      "requisiteStageRefIds": ["2"],      
      "stageEnabled": {
        "expression": "${ #stage('Job1').status.toString() != 'SUCCEEDED' }",
        "type": "expression"
      },
      "stageTimeoutMs": 30000,
      "type": "manualJudgment"
    },

I expected that the stage 3 will check a new status of stage 2 after restart

Upvotes: 1

Views: 17

Answers (0)

Related Questions