Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define Docker Swarm Agent Template in Jenkinsfile? #100

Open
oarevaloy opened this issue Jan 12, 2021 · 1 comment
Open

Define Docker Swarm Agent Template in Jenkinsfile? #100

oarevaloy opened this issue Jan 12, 2021 · 1 comment

Comments

@oarevaloy
Copy link

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

@jcouton
Copy link

jcouton commented Jan 13, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants