[JIRA] (JENKINS-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Jesse Glick commented on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Best to post to the Jenkins users’ list or similar for usage questions like this. 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server [~jglick] How do I achieve this: A declarative jenkinsfile spawns an agent-container on a remote docker host by only the name of the image. The container entrypoint starts the jnlp-agent and jenkins-master. When the jnlp-agent is up and running the communication between jenkins-master and agent is established. Now the jenkins-master tells the agent whats the next action defined in the jenkinsfile. The agents executes each build-step and returns via jnlp the console log messages to the master.This is the way we like to utilize the docker-plugin and declarative jenkinsfiles, but the jnlp-communication is not established. It's only established when we use a predefined docker template. But we don't want to make use of docker templates. Our development-teams should specify an image of their choice inside the jenkinsfile. We want to have the configuration unter git control.We need a way to provide these informations* User* Jenkins URL* Connect method,* Remote File System Root,* etc. (normally given by the docker template configuration) inside the jenkinsfile. Is there a way to achieve this? Below is a PoC, where the container is spawned at out our remote docker host but the checkout happens locally at the jenkins-master. We have defined a DOCKER_HOST environment variable that's pointing to our remote docker-host. {code:java}pipeline {agent {docker {image 'cloudbees/java-with-docker-client'}}stages {stage('Example Build') {steps {echo 'Step1'git changelog: false, credentialsId: 'SSH-Test', poll: false, url: 'ssh://git@X/Y/Z.git'}}}} {code} 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
[JIRA] (JENKINS-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server [~jglick] How do I achieve this: A declarative jenkinsfile spawns an agent-container on a remote docker host by only the name of the image. The container entrypoint starts the jnlp-agent and jenkins-master. When the jnlp-agent is up and running the communication between jenkins-master and agent is established. Now the jenkins-master tells the agent whats the next action defined in the jenkinsfile. The agents executes each build-step and returns via jnlp the console log messages to the master.This is the way we like to utilize the docker-plugin and declarative jenkinsfiles, but the jnlp-communication is not established. It's only established when we use a predefined docker template. But we don't want to make use of docker templates. Our development-teams should specify an image of their choice inside the jenkinsfile. We want to have the configuration unter git control.We need a way to provide these informations* User* Jenkins URL* Connect method,* Remote File System Root,* etc. (normally given by the docker template configuration) inside the jenkinsfile. Is there a way to achieve this? Below is a PoC, where the container is spawned at out remote docker host but the checkout happens locally at the jenkins-master. {code:java}pipeline {agent {docker {image 'cloudbees/java-with-docker-client'}}stages {stage('Example Build') {steps {echo 'Step1'git changelog: false, credentialsId: 'SSH-Test', poll: false, url: 'ssh://git@X/Y/Z.git'}}}} {code} 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
[JIRA] (JENKINS-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server [~jglick] How do I achieve this: A declarative jenkinsfile spawns an agent-container on a remote docker host by only the name of the image. The container entrypoint starts the jnlp-agent and jenkins-master. When the jnlp-agent is up and running the communication between jenkins-master and agent is established. Now the jenkins-master tells the agent whats the next action defined in the jenkinsfile. The agents executes each build-step and returns via jnlp the console log messages to the master.This is the way we like to utilize the docker-plugin and declarative jenkinsfiles, but the jnlp-communication is not established. It's only established when we use a predefined docker template. But we don't want to make use of docker templates. Our development-teams should specify an image of their choice inside the jenkinsfile. We want to have the configuration unter git control.We need a way to provide these informations* User* Jenkins URL* Connect method,* Remote File System Root,* etc. (normally given by the docker template configuration) inside the jenkinsfile. Is there a way to achieve this? {code:java}pipeline {agent {docker {image 'cloudbees/java-with-docker-client'}}stages {stage('Example Build') {steps {echo 'Step1'git changelog: false, credentialsId: 'SSH-Test', poll: false, url: 'ssh://git@X/Y/Z.git'}}}} {code} 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server [~jglick] How do I achieve this: A declarative jenkinsfile spawns an agent-container on a remote docker host by only the name of the image. The container entrypoint starts the jnlp-agent and jenkins-master. When the jnlp-agent is up and running the communication between jenkins-master and agent is established. Now the jenkins-master tells the agent whats the next action defined in the jenkinsfile. The agents executes each build-step and returns via jnlp the console log messages to the master.This is the way we like to utilize the docker-plugin and declarative jenkinsfiles, but the jnlp-communication is not established. It's only established when we use a predefined docker template. But we don't want to make use of docker templates. Our development-teams should specify an image of their choice inside the jenkinsfile. We want to have the configuration unter git control. What we We need a way to provide these informations* User* Jenkins URL* Connect method,* Remote File System Root,* etc. (normally given by the docker template configuration) inside the jenkinsfile.{code:java}pipeline {agent {docker {image 'cloudbees/java-with-docker-client'}}stages {stage('Example Build') {steps {echo 'Step1'git changelog: false, credentialsId: 'SSH-Test', poll: false, url: 'ssh://git@X/Y/Z.git'}}}} {code} 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server [~jglick] How do I achieve this: A declarative jenkinsfile spawns an agent-container on a remote docker host by only the name of the image. The container entrypoint starts the jnlp-agent and jenkins-master. When the jnlp-agent is up and running the communication between jenkins-master and agent is established. Now the jenkins-master tells the agent whats the next action defined in the jenkinsfile. The agents executes the each build- steps step and returns via jnlp the console log messages to the master . This is the way we like to utilize the docker-plugin and declarative jenkinsfiles, but the jnlp-communication is not established. It's only established when we use a predefined docker template. But we don't wann used the dockertemplates want to make use of docker templates . Our development-teams should specify an image of their choice inside the jenkinsfile. We want to have the configuration unter git control. What we need is a way to define provide these informations* User* Jenkins URL* Connect method,* Remote File System Root,* etc. (normally given by the same information from the docker template configuration ) inside the jenkinsfile.{code:java}pipeline {agent {docker {image 'cloudbees/java-with-docker-client'}}stages {stage('Example Build') {steps {echo 'Step1'git changelog: false, credentialsId: 'SSH-Test', poll: false, url: 'ssh://git@X/Y/Z.git'}}}} {code} 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
[JIRA] (JENKINS-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server [~jglick] How do I achieve this: A declarative jenkinsfile spawns an agent-container on a remote docker host by only the name of the image. The container entrypoint starts the jnlp-agent and jenkins-master. When the jnlp-agent is up and running the communication between jenkins-master and agent is established. Now the jenkins-master tells the agent whats the next action defined in the jenkinsfile. The agents executes the build-steps and returns via jnlp the console log messages. This is the way we like to utilize the docker-plugin and declarative jenkinsfiles, but the jnlp-communication is not established. It's only established when we use predefined docker template. But we don't wann used the dockertemplates. Our development-teams should specify an image of their choice inside the jenkinsfile. What we need is a way to define the same information from the docker template configuration inside the jenkinsfile. { { code:java} pipeline { }} {{ agent { }} {{ docker { }} {{ image 'cloudbees/java-with-docker-client' }} {{ } }} {{ } }}{{ stages { }} {{ stage('Example Build') { }} {{ steps { }} {{ echo 'Step1' }} {{ git changelog: false, credentialsId: 'SSH-Test', poll: false, url: 'ssh://git@X : / Y/Z /P .git' } } {{ } }} {{ } }}{{}}} { { code:java } }} 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server [~jglick] How do I achieve this: A declarative jenkinsfile spawns an agent-container on a remote docker host by only the name of the image. The container entrypoint starts the jnlp-agent and jenkins-master. When the jnlp-agent is up and running the communication between jenkins-master and agent is established. Now the jenkins-master tells the agent whats the next action defined in the jenkinsfile. The agents executes the build-steps and returns via jnlp the console log messages. This is the way we like to utilize the docker-plugin and declarative jenkinsfiles, but the jnlp-communication is not established. It's only established when we use predefined docker template. But we don't wann used the dockertemplates. Our development-teams should specify an image of their choice inside the jenkinsfile. What we need is a way to define the same information from the docker template configuration inside the jenkinsfile.{code:java}pipeline {agent {docker {image 'cloudbees/java-with-docker-client'}}stages {stage('Example Build') {steps {echo 'Step1'git changelog: false, credentialsId: 'SSH-Test', poll: false, url: 'ssh://git@X/Y/Z.git'}}}} {code :java } 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server [~jglick] How do I achieve this: A declarative jenkinsfile spawns an agent-container on a remote docker host by only the name of the image. The container entrypoint starts the jnlp-agent and jenkins-master. When the jnlp-agent is up and running the communication between jenkins-master and agent is established. Now the jenkins-master tells the agent whats the next action defined in the jenkinsfile. The agents executes the build-steps and returns via jnlp the console log messages.This is the way we like to utilize the docker-plugin and declarative jenkinsfiles, but the jnlp-communication is not established. It's only established when we use predefined docker template. But we don't wann used the dockertemplates. Our development-teams should specify an image of their choice inside the jenkinsfile.What we need is a way to define the same information from the docker template configuration inside the jenkinsfile. {{ pipeline { }} {{ agent { }} {{ docker { }} {{ image 'cloudbees/java-with-docker-client' } } {{ } }} {{ }}}{{ stages { }} {{ stage('Example Build') { }} {{ steps { }} {{ echo 'Step1' }} {{ git changelog: false, credentialsId: 'SSH-Test', poll: false, url: 'ssh://git@ Q.W.E.R X : 1234 Y/Z/P.git ' } } {{ } }} {{ } }}{{}}} {{ }} } 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil commented on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Jesse Glick How do I achieve this: A declarative jenkinsfile spawns an agent-container on a remote docker host by only the name of the image. The container entrypoint starts the jnlp-agent and jenkins-master. When the jnlp-agent is up and running the communication between jenkins-master and agent is established. Now the jenkins-master tells the agent whats the next action defined in the jenkinsfile. The agents executes the build-steps and returns via jnlp the console log messages. This is the way we like to utilize the docker-plugin and declarative jenkinsfiles, but the jnlp-communication is not established. It's only established when we use predefined docker template. But we don't wann used the dockertemplates. Our development-teams should specify an image of their choice inside the jenkinsfile. What we need is a way to define the same information from the docker template configuration inside the jenkinsfile. {{ pipeline { agent { docker { image 'cloudbees/java-with-docker-client' } } stages { stage('Example Build') { steps { echo 'Step1' git changelog: false, credentialsId: 'SSH-Test', poll: false, url: 'ssh://git@Q.W.E.R:1234' } } } } }} 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Jesse Glick commented on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Yes you can that sort of command if you prefer to avoid Image.inside. 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Thank you [~jglick]. We found it yesterday later on in the cloudbee-docs (https://go.cloudbees.com/docs/plugins/docker-workflow/). As far as I see in the doc (http://jenkins-qs3.hmmh.ag/job/sven_pipeline_scripted/pipeline-syntax/globals) there are only three properties {{Container}} has. Is this all or am I missing some methods of {{Container}}?My understanding is to use {{container.id}} to make remote exec calls like this: {{sh "docker exec -i ${container.id sh } -c ‘cd /var/www/html/wordpress && git pull’"}}Is this the way to go when we want to inject commands in a remote container?Thanks again for your support. 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil commented on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Thank you Jesse Glick. We found it yesterday later on in the cloudbee-docs (https://go.cloudbees.com/docs/plugins/docker-workflow/). As far as I see in the doc (http://jenkins-qs3.hmmh.ag/job/sven_pipeline_scripted/pipeline-syntax/globals) there are only three properties Container has. Is this all or am I missing some methods of Container? My understanding is to use container.id to make remote exec calls like this: sh "docker exec -i ${container.id sh} -c ‘cd /var/www/html/wordpress && git pull’" Is this the way to go when we want to inject commands in a remote container? Thanks again for your support. 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Jesse Glick commented on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Sven Scheil Because that is what withRun does. You give it a closure with a Container parameter and do whatever you like with that. Your example is throwing away the parameter, so it starts a container, does some unrelated stuff, then stops the container unused. 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Hi there,we have the same/similar problem. We want to start a container outside of our jenkins-master container.We try a PoC with this small Jenkinsfile Pipeline definition{code:java}node {//checkout scmdocker.withServer('tcp://192.168.122.1:4243') {docker.image('bash:latest').withRun() {sh 'hostname -I'sh 'sleep 60s'sh 'hostname -I'}}} {code} Jenkins-masterexecutes the pipeline successfully. Running the pipeline starts a new container at our specified host 192.168.122.1. We could monitor this with a 'docker container ls -a' command. But the three 'sh' commands won't be execute inside the spawned container. They are excuted inside the jenkins-master container.We have try for days now and have no more ideas.Any help is appreciated. 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Hi there,we have the same/similar problem. We want to start an a container outside of our jenkins-master container.We try a PoC with this small Jenkinsfile Pipeline definition{code:java}node {//checkout scmdocker.withServer('tcp://192.168.122.1:4243') {docker.image('bash:latest').withRun() {sh 'hostname -I'sh 'sleep 60s'sh 'hostname -I'}}} {code}Running the pipeline starts a new container at our specified host 192.168.122.1. We could monitor this with a 'docker container ls -a' command. But the three 'sh' commands won't be execute inside the spawned container. They are excuted inside the jenkins-master container.We have try for days now and have no more ideas.Any help is appreciated. 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Sven Scheil commented on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Hi there, we have the same/similar problem. We want to start an container outside of our jenkins-master container. We try a PoC with this small Jenkinsfile Pipeline definition node { //checkout scmdocker.withServer('tcp://192.168.122.1:4243') { docker.image('bash:latest').withRun() { sh 'hostname -I' sh 'sleep 60s' sh 'hostname -I' } } } Running the pipeline starts a new container at our specified host 192.168.122.1. We could monitor this with a 'docker container ls -a' command. But the three 'sh' commands won't be execute inside the spawned container. They are excuted inside the jenkins-master container. We have try for days now and have no more ideas. Any help is appreciated. 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Julio Guimaraes edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server One year after my first post, I don't know if someone will be needing this yet, but maybe I can help someone:According to [the official installation documentation|https://jenkins.io/doc/book/installing/] today, it recommends using [jenkinsci/blueocean image|https://hub.docker.com/r/jenkinsci/blueocean/] (not [https://hub.docker.com/_/jenkins|https://hub.docker.com/_/jenkins/] as it was in the past).So, I looked for the Dockerfile (blueocean-plugin/docker/official/Dockerfile) for this image in the [jenkinsci/blueocean-plugin GitHub repository|https://github.com/jenkinsci/blueocean-plugin]. And it contains these lines:{code:java}# Add the docker binary so running Docker commands from the master works nicelyRUN apk -U add docker{code}In my tests using this new image I don't even map the "-v /var/run/docker.sock:/var/run/docker.sock". The results are: * It seems that the docker deamon is not started, so there aren't containers running inside the Jenkins container; * Now I can create pipelines in Jenkins capable of connecting to remote docker servers (or even in the local machine) using docker.withServer('tcp://my.docker.host:2345'). :)Apparently, this new image contains at least the docker client (which was not present in the old image) and it is necessary for using remote docker servers. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this
[JIRA] (JENKINS-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Julio Guimaraes commented on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server One year after my first post, I don't know if someone will be needing this yet, but maybe I can help someone: According to the official installation documentation today, it recommends using jenkinsci/blueocean image (not https://hub.docker.com/_/jenkins as it was in the past). So, I looked for the Dockerfile (blueocean-plugin/docker/official/Dockerfile) for this image in the jenkinsci/blueocean-plugin GitHub repository. And it contains these lines: # Add the docker binary so running Docker commands from the master works nicely RUN apk -U add docker In my tests using this new image I don't even map the "-v /var/run/docker.sock:/var/run/docker.sock". The results are: It seems that the docker deamon is not started, so there aren't containers running inside the Jenkins container; I can create pipelines in Jenkins capable of connecting to remote docker servers (or even in the local machine) using docker.withServer('tcp://my.docker.host:2345'). Apparently, this new image contains at least the docker client (which was not present in the old image) and it is necessary for using remote docker servers. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
[JIRA] (JENKINS-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Jesse Glick commented on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Possible duplicate of JENKINS-39243. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Jesse Glick resolved as Incomplete That documentation refers to this plugin. Adam Hajduk and chenna reddy, your issues sound unrelated: you are just neglecting to use withTool. Jenkins / JENKINS-32709 Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Change By: Jesse Glick Status: Reopened Resolved Resolution: Incomplete Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving
[JIRA] (JENKINS-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title chenna reddy edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Am having the exact same issue as Adam Hajduk. Is anyone aware of an alternative solution until a fix is released ? We use Cloudbees, am not sure if this is the case only with Cloudbees plugin (https://go.cloudbees.com/docs/cloudbees-documentation/cje-user-guide/chapter-docker-workflow.html). {code:none} > git rev-list 2552 # timeout=10[Pipeline] pwd[Pipeline] withEnv[Pipeline] {[Pipeline] sh[cpf_docker_ecr_test] Running shell script+ docker build -t demo ./scratch/jenkins/workspace/MYDEV/new_docker_ecr_test@tmp/durable-e0281116/script.sh: line 2: docker: command not found[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineERROR: script returned exit code 127Finished: FAILURE{code} Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title chenna reddy edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Am having the exact same issue as Adam Hajduk. Is anyone aware of an alternative solution until a fix is released ?{code:none} > git rev-list 2552 # timeout=10[Pipeline] pwd[Pipeline] withEnv[Pipeline] {[Pipeline] sh[cpf_docker_ecr_test] Running shell script+ docker build -t demo ./scratch/jenkins/workspace/ ATG Advanced Development MYDEV /cpf_docker_ecr_test@tmp/durable-e0281116/script.sh: line 2: docker: command not found[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineERROR: script returned exit code 127Finished: FAILURE{code} Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title chenna reddy edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Am having the exact same issue as Adam Hajduk. Is anyone aware of an alternative solution until a fix is released ?{code:none} > git rev-list 2552 # timeout=10[Pipeline] pwd[Pipeline] withEnv[Pipeline] {[Pipeline] sh[cpf_docker_ecr_test] Running shell script+ docker build -t demo ./scratch/jenkins/workspace/MYDEV/ cpf_docker_ecr_test new_docker_ecr_test @tmp/durable-e0281116/script.sh: line 2: docker: command not found[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineERROR: script returned exit code 127Finished: FAILURE{code} Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title chenna reddy edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Am having the exact same issue as Adam Hajduk. Is anyone aware of an alternative solution until a fix is released ?{code: shell none } > git rev-list 2552 # timeout=10[Pipeline] pwd[Pipeline] withEnv[Pipeline] {[Pipeline] sh[cpf_docker_ecr_test] Running shell script+ docker build -t demo ./scratch/jenkins/workspace/ATG Advanced Development/cpf_docker_ecr_test@tmp/durable-e0281116/script.sh: line 2: docker: command not found[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineERROR: script returned exit code 127Finished: FAILURE{code} Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title chenna reddy edited a comment on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Am having the exact same issue as Adam Hajduk. Is anyone aware of an alternative solution until a fix is released ? {code:shell} > git rev-list 2552 # timeout=10[Pipeline] pwd[Pipeline] withEnv[Pipeline] {[Pipeline] sh[cpf_docker_ecr_test] Running shell script+ docker build -t demo ./scratch/jenkins/workspace/ATG Advanced Development/cpf_docker_ecr_test@tmp/durable-e0281116/script.sh: line 2: docker: command not found[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineERROR: script returned exit code 127Finished: FAILURE{code} Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title chenna reddy commented on JENKINS-32709 Re: Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Am having the exact same issue as Adam Hajduk. Is anyone aware of an alternative solution until a fix is released ? Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Adam Hajduk reopened an issue I have the same issue. I'm running Jenkins where neither host nor slave nodes have docker tools. The Jenkins file looks like here: parallel 'test 1': { node { stage('Integ Tests 1') {} docker.withServer('tcp://my.docker.host:5001', 'integ-docker-certs') { def cimg1 = docker.image('my-image/npf-dist-docker') cimg1.run('-p 5000:6000') cimg1.stop() } } } When I run the pipeline, the output is like here: [Pipeline] [test 1] { (Integ Tests 1) [Pipeline] [test 1] } [Pipeline] [test 1] // stage [Pipeline] [test 1] withDockerServer [Pipeline] [test 1] { [Pipeline] [test 1] sh [test 1] [my-prod] Running shell script [test 1] + docker run -d -p 5000:6000 my-image/npf-dist-docker [test 1] /var/lib/jenkins/workspace/Products/Prod/npf-Docker-Test@tmp/durable-5a1339e2/script.sh: line 2: docker: command not found [Pipeline] [test 1] } [Pipeline] [test 1] // withDockerServer [Pipeline] [test 1] } [Pipeline] [test 1] // node [Pipeline] [test 1] } [test 1] Failed in branch test 1 So it does not seems to connect to external Docker server, it seems to try to run it locally... Am I missing some setup? Thanks, /Adam Jenkins / JENKINS-32709 Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Change By: Adam Hajduk Resolution: Incomplete Status: Resolved Reopened
[JIRA] (JENKINS-32709) Docker Pipeline plugin: docker.withServer still executes on local Jenkins server
Title: Message Title Jesse Glick resolved as Incomplete Jenkins / JENKINS-32709 Docker Pipeline plugin: docker.withServer still executes on local Jenkins server Change By: Jesse Glick Status: Open Resolved Resolution: Incomplete Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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.