Jenkins Build Pipeline - Restart At Stage

后端 未结 7 1749
忘了有多久
忘了有多久 2020-12-02 14:55

I have the following build pipeline set up as a job:

Stage 1 - verify all dependencies exist
Stage 2 - build the new jar
Stage 3 - Run integration tests
Stag         


        
7条回答
  •  独厮守ぢ
    2020-12-02 14:56

    You can wrap your code in a retry step:

    stage "Deployment"
    retry(3) {
      sh "deploy.."
    }
    

    EDIT: This might help in the free version of Jenkins. Users of CloudBees Enterprise, please see @tarantoga's answer.

提交回复
热议问题