[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Robert Horvath edited a comment on JENKINS-55096 Re: can not override jnlp container Same issue here with a declarative pipline.Jenkins version: 2.190.1Kubernetes plugin: 1.20.1I've created a pod template under Cloud section on the ui. With the following options:{code:java}Pod Template::Name: jenkins-builder...Container Template ::Name: my-jnlpDocker image: jenkins/jnlp-slave:latestWorking directory: /home/jenkins/agent..Workspace Volume: PVCClaim name: jenkins-slave-claim{code}Then created this basic pipline:{code}pipeline { agent {kubernetes { defaultContainer 'my-jnlp' yaml """apiVersion: v1kind: Podmetadata: name: jenkins-builderspec: containers: - name: busyboximage: busyboxcommand: - cattty: true""" } } stages { stage('start') {steps{container('busybox'){sh "ls" } } } }}{code}In the console I always get the default jnlp container:{code}apiVersion: "v1"kind: "Pod"metadata: annotations:buildUrl: "http://jenkins.default.svc.k8s.si.net:8080/job/test/20/" labels:jenkins: "slave"jenkins/test_20-s37fr: "true" name: "test-20-s37fr-xq14x-z8rq5"spec: containers: - command:- "cat"image: "busybox"name: "busybox"tty: truevolumeMounts:- mountPath: "/home/jenkins/agent" name: "workspace-volume" readOnly: false - command:- "cat"image: "maven:3-alpine"name: "builder-new"tty: truevolumeMounts:- mountPath: "/home/jenkins/agent" name: "workspace-volume" readOnly: false - env:- name: "JENKINS_SECRET" value: ""- name: "JENKINS_TUNNEL" value: "jenkins-agent.default.svc.k8s.si.net:5"- name: "JENKINS_AGENT_NAME" value: "test-20-s37fr-xq14x-z8rq5"- name: "JENKINS_NAME" value: "test-20-s37fr-xq14x-z8rq5"- name: "JENKINS_AGENT_WORKDIR" value: "/home/jenkins/agent"- name: "JENKINS_URL" value: "http://jenkins.default.svc.k8s.si.net:8080/"image: "jenkins/jnlp-slave:alpine"name: "jnlp"volumeMounts:- mountPath: "/home/jenkins/agent" name: "workspace-volume" readOnly: false nodeSelector: {} restartPolicy: "Never" volumes: - emptyDir: medium: ""name: "workspace-volume"{code}So it's not what I'd like to see. I cannot find out how I can use my Pod with the PVC. I cannot workaround this with JENKINS-56375 unfortunately. Add Comment
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Robert Horvath commented on JENKINS-55096 Re: can not override jnlp container Same issue here with a declarative pipline. Jenkins version: 2.190.1 Kubernetes plugin: 1.20.1 I've created a pod template under Cloud section on the ui. With the following options: Pod Template:: Name: jenkins-builder ... Container Template :: Name: my-jnlp Docker image: jenkins/jnlp-slave:latest Working directory: /home/jenkins/agent ... ... Workspace Volume: PVC Claim name: jenkins-slave-claim Then created this basic pipline: pipeline { agent { kubernetes { defaultContainer 'my-jnlp' yaml """ apiVersion: v1 kind: Pod metadata: name: jenkins-builder spec: containers: - name: busybox image: busybox command: - cat tty: true """ } } stages { stage('start') { steps{ container('busybox'){ sh "ls" } } } } } In the console I always get the default jnlp container: apiVersion: "v1" kind: "Pod" metadata: annotations: buildUrl: "http://jenkins.default.svc.k8s.si.net:8080/job/test/20/" labels: jenkins: "slave" jenkins/test_20-s37fr: "true" name: "test-20-s37fr-xq14x-z8rq5" spec: containers: - command: - "cat" image: "busybox" name: "busybox" tty: true volumeMounts: - mountPath: "/home/jenkins/agent" name: "workspace-volume" readOnly: false - command: - "cat" image: "maven:3-alpine" name: "builder-new" tty: true volumeMounts: - mountPath: "/home/jenkins/agent" name: "workspace-volume" readOnly: false - env: - name: "JENKINS_SECRET" value: "" - name: "JENKINS_TUNNEL" value: "jenkins-agent.default.svc.k8s.si.net:5" - name: "JENKINS_AGENT_NAME" value: "test-20-s37fr-xq14x-z8rq5" - name: "JENKINS_NAME" value: "test-20-s37fr-xq14x-z8rq5" - name: "JENKINS_AGENT_WORKDIR" value: "/home/jenkins/agent" - name: "JENKINS_URL" value: "http://jenkins.default.svc.k8s.si.net:8080/" image: "jenkins/jnlp-slave:alpine" name: "jnlp" volumeMounts: - mountPath: "/home/jenkins/agent" name: "workspace-volume" readOnly: false nodeSelector: {} restartPolicy: "Never" volumes: - emptyDir: medium: "" name: "workspace-volume" So it's not what I'd like to see. I cannot find out how I can use my Pod with the PVC.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Ian Tewksbury commented on JENKINS-55096 Re: can not override jnlp container Carlos Sanchez I am still having this issue. I don't have any pod templates defined in the `Kubernetes` configuration. I only define the pod / containers in the declarative pipelines. So there is no merging going on. But for some reason no matter what i put in for `image` for the `jnlp` container in the declarative pipeline, it gets ignored and the default alipine container gets used. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Carlos Sanchez commented on JENKINS-55096 Re: can not override jnlp container suryatej yaramada your pod is failing, you need to check why Agent is not connected after 30 seconds so it is probably using an old agent or another one you have with the same label Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Sushant Pradhan commented on JENKINS-55096 Re: can not override jnlp container I also have similar issue. Irrespective of yaml or ui override, the plugin is always pulling jnlp:alpine even though i have my custom jnlp named as jnlp Jenkins: 2.150.3 and Kubernetes plugin: 1.14.3 Can we please reopen this ticket or explain what configuration will make my custom jnlp work? Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Sushant Pradhan commented on JENKINS-55096 Re: can not override jnlp container I also have similar issue. Irrespective of yaml or ui override, the plugin is always pulling jnlp:alpine even though i have my custom jnlp named as jnlp Jenkins: 2.150.3 and Kubernetes plugin: 1.14.3 Can we please reopen this ticket or explain what configuration will make my custom jnlp work? Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title suryatej yaramada edited a comment on JENKINS-55096 Re: can not override jnlp container I tried with custom image didn't work so given jenkins-jnlp official image even didn't work using this on scripted pipelinenode('eks-cluster') { stage('Check jnlp') { sh 'rm -rf *' Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title suryatej yaramada commented on JENKINS-55096 Re: can not override jnlp container I tried with custom image didn't work so given jenkins-jnlp official image even didn't work Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title suryatej yaramada commented on JENKINS-55096 Re: can not override jnlp container Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title suryatej yaramada updated an issue Jenkins / JENKINS-55096 can not override jnlp container Change By: suryatej yaramada Attachment: Screenshot from 2019-02-15 11-39-39.png Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title suryatej yaramada commented on JENKINS-55096 Re: can not override jnlp container I am facing the same issue here are logs Error in provisioning; agent=KubernetesSlave name: eks-cluster-zjkg8, template=PodTemplate{inheritFrom='', name='eks-cluster', namespace='default', slaveConnectTimeout=30, label='eks-cluster', nodeSelector='', nodeUsageMode=NORMAL, workspaceVolume=EmptyDirWorkspaceVolume [memory=false], volumes=[HostPathVolume [mountPath=/var/run/docker.sock, hostPath=/var/run/docker.sock]], containers=[ContainerTemplate {name='jnlp', image='jenkins/jnlp-slave:alpine', alwaysPullImage=true, workingDir='/home/jenkins', command='/bin/sh -c', args='cat', ttyEnabled=true, resourceRequestCpu='', resourceRequestMemory='', resourceLimitCpu='', resourceLimitMemory='', livenessProbe=org.csanchez.jenkins.plugins.kubernetes.ContainerLivenessProbe@1c48445b} ], yaml=} java.lang.IllegalStateException: Agent is not connected after 30 seconds, status: Running at org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher.launch(KubernetesLauncher.java:224) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:294) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Carlos Sanchez commented on JENKINS-55096 Re: can not override jnlp container That was for Dmitry yaml is not merged with parent and then UI defined containers take precedence over yaml defined containers You can't mix UI inheritance with overriding yaml fields, you need to override using containerTemplate Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Ian Tewksbury commented on JENKINS-55096 Re: can not override jnlp container Carlos Sanchez I don't understand why you closed this? > you are overriding the jnlp container in your pod template, so that's the one that gets picked up, with no env vars the problem is that I am overriding the JNLP container in my pod template in the declarative pipeline, and that is not the one that is getting picked up, I am always getting the default JNLP container. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Carlos Sanchez closed an issue as Not A Defect Jenkins / JENKINS-55096 can not override jnlp container Change By: Carlos Sanchez Status: Open Closed Resolution: Not A Defect Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Carlos Sanchez commented on JENKINS-55096 Re: can not override jnlp container you are overriding the jnlp container in your pod template, so that's the one that gets picked up, with no env vars Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Carlos Sanchez commented on JENKINS-55096 Re: can not override jnlp container logs please https://github.com/jenkinsci/kubernetes-plugin/#debugging Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Dmitry commented on JENKINS-55096 Re: can not override jnlp container Update: I've upgraded Jenkins version to the 2.150.1 and plugin to 1.14.3, now I was able to override jnlp container image, but podTemplate inheritance is still broken, my settings are: The pipeline code is: podTemplate(label: 'myPod', inheritFrom: 'defaultpod', containers: [ containerTemplate(name: 'jnlp', image: 'mycustomimage'), containerTemplate(name: 'golang', image: 'golang:1.8.0', ttyEnabled: true, command: 'cat') ]) { node('myPod') { but the pod template I get in k8s doesn't has TEST_VAR variable defined Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Dmitry updated an issue Jenkins / JENKINS-55096 can not override jnlp container Change By: Dmitry Attachment: image-2019-01-15-17-13-06-625.png Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Dmitry updated an issue Jenkins / JENKINS-55096 can not override jnlp container Change By: Dmitry Attachment: image-2019-01-15-17-12-54-166.png Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Ivan Ivanov commented on JENKINS-55096 Re: can not override jnlp container Carlos Sanchez, I have the same problem: I have custom pod template with jnlp container override created via UI (custom image). When I use its label from my pipelines everything work ok. However once I try to extend this pod with additional containers via inherit>From statement or using pod nesting, I get default jnlp container with default alpine image. My plugin version is 1.13.8 I've tried to enable the plugin logging using Jenkins custom loggers feature, however it's always empty for some reason. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Ivan Ivanov commented on JENKINS-55096 Re: can not override jnlp container Carlos Sanchez, I have the same problem: I have custom pod template with jnlp container override created via UI (custom image). When I use its label from my pipelines everything work ok. However once I try to extend this pod with additional containers via inherit>From statement or using pod nesting, I get default jnlp container with default alpine image. My plugin version is 1.13.8 I've tried to enable the plugin logging using Jenkins custom loggers feature, however it's always empty for some reason. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55096) can not override jnlp container
Title: Message Title Carlos Sanchez updated an issue Jenkins / JENKINS-55096 can not override jnlp container Change By: Carlos Sanchez Summary: can not override j jnlp container Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.