-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: pipeline, workflow-cps-plugin
Assuming the following Jenkinsfile :
node {
try {
def stepA = load(stepA.groovy)
stepA.call()
  def stepB = load(stepB.groovy)
stepB.call()
}catch(Exception e){
def handler = load(error.groovy)
handler.call()
}
}
Â
If stepA throws an exception, Jenkins will execute stepA.groovy and error.groovy.
Then if I replay the job, jenkins will let me edit :
- stepA.groovy as 'Script 1'
- error.groovy as 'Script 2'
If stepA runs fine during the replay, Jenkins will override stepB.groovy with 'Script 2' (ie error.groovy).
Actual Behavior :
Edited scripts override the loaded script based on execution order.
Expected behavior :
Edited scripts should override the loaded scripts based on their paths.
Â