-
Bug
-
Resolution: Unresolved
-
Major
-
None
Depending on the type of declarative pipeline, you can experience inconsistent behavior and inheritance of variables.
Using the SSH Agent example, you can see that the container and sshAgent wrappers do not always play nice.
https://github.com/MattLud/kubernetes-plugin/commit/3488e1ff1e7d5195616883a9a18dcd593ba29397
The take away is that using the legacy pod template WITH declarative pipeline is the only one that works. The rest, declarative and fromYaml with declarative and declarative pipeline, fail to work inside the sshAgent block.
https://github.com/jenkinsci/kubernetes-plugin/pull/331