RAJARAJESHWARIE .K
RAJARAJESHWARIE .K

Reputation: 21

Jenkins pipeline restart from a stage API

Is there any Rest APIs provided by jenkins to restart from a stage in a pipeline?

I am trying to restart a pipeline from a stage. In UI it is possible using 'restart from stage', but there are no API support for the same.

Upvotes: 1

Views: 24

Answers (1)

YassineLbk
YassineLbk

Reputation: 165

  • Using API, it doesn't look to be possible.
  • In the other hand, Jenkins CLI provides this option :

restart-from-stage : Restart a completed Declarative Pipeline build from a given stage.

java -jar jenkins-cli.jar -s http://[ip]:[port]/ -auth user:password restart-from-stage -j [JOB_NAME] -s [stage name]

Upvotes: 0

Related Questions