-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
We have a common pipeline which our devs use - they provide some configuration parameters, and it runs a set of common steps (build, test, upload etc.). In our Linux environment we use containers to define the build environment, but on Windows we have resorted to VMs (as Windows Docker doesn't offer the support we need).
With the current implementation of declarative pipelines, where agents are defined statically (upfront), we have to duplicate this code, which leads to extra maintenance and issues when they get out of sync. It would be nice if there was a way to define an agent dynamically/conditionally so that the same pipeline stages could be used, regardless of if Jenkins runs the steps inside a container (or not).