I have a pipeline roughly below (largely borrowed from this) and I need to stop and remove it from the history if it aborts. I'm trying to avoid a plugin. Is there an easy way to delete it from the history?
node {
checkout scm
result = sh (script: "git log -1 | grep '\\[release\\]'", returnStatus: true)
if (result == 0) {
currentBuild.result = 'ABORTED'
}
}