Open oarevaloy opened 3 years ago
The only way I achieved this is to use the Configuration As Code plugin, which let you use Yaml to configure Jenkins.
I have the feeling that you would like to call different templates based on the job being executed, my workaround for that is to declare multiple templates in the agentTemplates
section of the CasC and call the one I need in the Jenkinsfile.
Not the perfect answer by any mean but it might help.
Regards
I would like to define the templates from code, directly in the Jenkinsfile or from yaml.
Just like the podTemplate statement in the Kubernetes plugin: https://github.com/jenkinsci/kubernetes-plugin