I have a Jenkins pipeline which has multiple stages, for example:
node(\"nodename\") { stage(\"Checkout\") { git .... } stage(\"Check Preconditions
The thing that we use is:
try { input 'Do you want to abort?' } catch (Exception err) { currentBuild.result = 'ABORTED'; return; }
The "return" at the end makes sure that no further code is executed.