jenkinsci / jenkinsfile-runner

A command line tool to run Jenkinsfile as a function
MIT License
1.13k stars 291 forks source link

Jump to stage/Skip stages #592

Open cdupont opened 2 years ago

cdupont commented 2 years ago

Hello, I use jenkinsfile-runner to debug my jenkinsfile and make quick tests. It would be nice to have a feature to "jump to stage". For instance if I have a pipeline with the following stages: build -> deploy -> test I could skip build and deploy and jump directly to test.

Possible syntax:

--skipStages VAL1, VAL2 : skip the stages VAL1 and VAL2
oleg-nenashev commented 2 years ago

It would be nice indeed, especially for the Declarative Pipeline when it is trivial. I am not sure it is possible with the current Pipeline engine.

FWIW it is possible to skip declarative stages based on a condition