Hi thanks for explanation can you please do me a favour about Jenkins pipeline i.e., If a stage fails in the Jenkins pipeline then the next stages should be skipped and I don't want to see the failure on skipped stages in the Jenkins pipeline UI
@satishkumar-xf6sg2 жыл бұрын
Nice explanation. Thank you
@ВладимирКазанцев-ц9т Жыл бұрын
Hello, do you have a try catch video?
@mihai656411 ай бұрын
good video
@prasadreddy2008 Жыл бұрын
hi it is a nice explanation and could you please let me know how to add this in Groovy
@guddytech14544 ай бұрын
can help with that
@guddytech14544 ай бұрын
It will look like this: stages { stage("Deploy") { steps { catchError(message: 'It failed here. At Deploy Stage. Error occurred in Deploy Stage', buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { script { echo 'Hello-World' } } } } } Your scripts will be inside of the catcherror block, while the catcherror block will be inside your steps block. You can customise messages for error handling inside the catcherror block and also decide how you want your build result and stage result to look like when there is an error. Cheers