0
votes

I am using jenkins pipeline and my Jenkinsfile has several stages and jobs. Is there any way to run specific job outside of jenkins pipeline ?

Example: Let's say one of the stage is to do "scp build artifacts to remote location". For some reason this got failed and if at all I want to run rest of the jobs manually out of jenkins pipeline, how can I do that ?

I am least interested to invoke a new build. So can we run remaining jobs after failure outside of jenkins pipeline manually ?

1
Couldn't you just handle the error (e.g. with a try-catch block)? - smelm
Actually I just want to try some POST jobs mentioned in Jenkinsfile manually from Jenkins UI. - aditya Kantamraju
would the replay feature work in this case? - smelm
Nope. Replay is all together initiating a new build which I don't want. - aditya Kantamraju
Just delete the code for the build part in the replay view - smelm

1 Answers

0
votes

You may be able to do it by writing unit test cases to your Jenkinsfile and test them as a maven project. This may or may not solve your problem without looking at your entire problem but if you can reorganize your logic to achieve 100% test coverage then it is doable. You can find more information about writing test cases of Jenkins pipelines here