Hi, I have such jenkins file, looks like the catchError behavior isn’t expected when set build propagate: true
catchError(stageResult: 'UNSTABLE', buildResult: null) {
def buildResult = build propagate: true, job: 'test', parameters: [xxx]
def buildNumber = buildResult.getNumber()
env.testBuildNumber = buildNumber
}
when the "test" job is FAILTURE, the currentBuild.currentResult still is FAILTURE, and I can't get env.testBuildNumber too.