Is there any way to use a variable or closure to configure a pipeline's agent?
We have cases where a pipeline has to run on a VM and others when it runs on Kubernetes, however we don't want to duplicate the entire pipeline. All of the documentation shows this as being hardcoded <https://jenkins.io/doc/book/pipeline/syntax/#agent> and our attempts to define variables using closures to configure it failed. -- [image: BandwidthMaroon.png] Andy Feller • Sr DevOps Engineer 900 Main Campus Drive, Suite 500, Raleigh, NC 27606 e: afel...@bandwidth.com -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAAg6KNHXyALEGh_krdFf7pkcxOQHE%3DrWfr_mdBPVUiaepVg7-g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.