Currently, using shared libraries, it is possible to override a higher level “vars” script with a lower level one. For example suppose I have 2 shared libraries, “Global” and “Blue”, and these both define foo.groovy. When I call foo() in my pipeline script it will use the “Blue” implementation of the foo script.
–Folder A - (shared lib: Global)
----Folder B - (shared lib: Blue)
------Job - calls foo()
This is the desired behavior. However when I go to replay my Job, I see that the scripts shown in the replay listing contains the “Global” implementation of the foo script and when I run the replay it uses the “Global” implementation.
This raises the question, is the ability to override “vars” scripts today something that was intended or is that a bug?
If the answer is “yes, intended” then it seems like the replay behavior is a bug.