Hi
You can use this function for pipeline
@NonCPS
def killthis_job() {
def jobname = env.JOB_NAME
def buildnum = env.BUILD_NUMBER.toInteger()
def job = Jenkins.instance.getItemByFullName(jobname)
for (build in job.builds) {
if (!build.isBuilding()) { continue; }
if (buildnum ==
Is there a possibility to abort a job during it's execution by the job itself.
For instance the job launch a script that do the update from versioning tool
and if no update are available, then the job is aborted.
This way the job is not stored at all by Jenkins.
Some plugin do already the tool v