79817125

Date: 2025-11-11 21:17:13
Score: 1
Natty:
Report link

The following solution ensures the pipeline is aborted only if not on master:

def isMasterBuild = env.BRANCH_NAME == 'master'

pipeline {
    agent any
    options {
        disableConcurrentBuilds(abortPrevious: !isMasterBuild)
    }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Wladimir Safonov