Home > other >  Jenkins Pipeline how to achieve a certain stage the whole Pipeline failure still can continue to run
Jenkins Pipeline how to achieve a certain stage the whole Pipeline failure still can continue to run

Time:03-21




Jenkins version for 2.150.1, using pipeline control multiple task order

Pipeline script is as follows:

The node {
Stage (' download file to the device ') {
Build a '2 _12_4xx_nr1000_download_program'
}
Stage (' test B02 NR1123 ') {
Build a '2 _12_4xx_nr1123'
}
Stage (' test B03 NR1156 ') {
Build a '2 _12_4xx_nr1156'
}
}

Under normal circumstances this script can run normally, but if one of the stages of failure, such as 2 _12_4xx_nr1123 fails, then the subsequent stage will not continue to perform, the entire pipeline is annulled, excuse me how to achieve a certain stage of failure, the subsequent stage still can continue to run, in order to improve the test efficiency?





CodePudding user response:


Try catch

CodePudding user response:


I currently use MultiJob way, can satisfy my needs, interface can be set wrong is to continue or stop

CodePudding user response:

Use witherror package your steps,
  • Related