Kubernetes plugin in a JobDSL environment

15 views
Skip to first unread message

Sean Walberg

unread,
Apr 4, 2019, 2:26:01 PM4/4/19
to Jenkins Users
Hi,

The kubernetes-plugin has the "container" keyword to run commands inside the given container instead of the default jnlp sidecar. Is there an equivalent in Job DSL?

We have everything defined in Job DSL as freestyle jobs and I'm able to point a job to the Kubernetes label and it'll spin up the containers, but everything gets run in the jnlp container, not the one I defined in the global config. The container keyword fixes it if I make a Pipeline job but unfortunately we don't use that.

Thanks,

Sean

Carlos Sanchez

unread,
Apr 4, 2019, 3:44:25 PM4/4/19
to Jenkins Users
You can't use 'container' with freestyle jobs, there's no way to switch containers .
IIRC you can set the default container to be different than jnlp

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/940dcae2-e0d8-4b44-83c5-b0640b3e204d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sean Walberg

unread,
Apr 5, 2019, 1:25:43 PM4/5/19
to Jenkins Users
I don't suppose you know which option that is? I see a default parent, but no default container. Thanks!

Sean

On Thursday, April 4, 2019 at 3:44:25 PM UTC-4, Carlos Sanchez wrote:
You can't use 'container' with freestyle jobs, there's no way to switch containers .
IIRC you can set the default container to be different than jnlp

On Thu, Apr 4, 2019, 20:34 Sean Walberg <swal...@gmail.com> wrote:
Hi,

The kubernetes-plugin has the "container" keyword to run commands inside the given container instead of the default jnlp sidecar. Is there an equivalent in Job DSL?

We have everything defined in Job DSL as freestyle jobs and I'm able to point a job to the Kubernetes label and it'll spin up the containers, but everything gets run in the jnlp container, not the one I defined in the global config. The container keyword fixes it if I make a Pipeline job but unfortunately we don't use that.

Thanks,

Sean

--
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 jenkins...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages