Hi all,
I have a Jenkins pipeline defined (Windows server 2016) and I’m trying to get it to use docker containers instead of building locally. The docker-slaves-plugin looked like the most convenient interface for this among a confusing forest of different Docker plugins.
So I installed it and pointed it at my Docker image in the configuration. It carried on exactly as before and ignored Docker entirely, even after Jenkins restart.
I then found a hint that I should replace “node” with “dockerNode(‘myimage’)” in my Jenkinsfile. So I did that, and got the following in my build log (with debug option enabled).
Note the “docker create” line which seems to be referring to a bunch of linux paths that just don’t exist and looks a bit hardcoded...
If, as I suspect, this isn't supported, any hints on which plugin to use instead would be appreciated.
Regards,
Geoff Bache
Start Docker container to host the build
$ docker volume create
$ docker create --interactive --log-driver=none --env TMPDIR=/home/jenkins/.tmp --user 10000:10000 --rm --volume 45aa67db1c5cc27820ebc3afd7abdd4a708b78f8d7ce2720fdbc2c7956ac2a52:/home/jenkins/ jenkins/agent/ java -Djava.io.tmpdir=/home/jenkins/.tmp -jar /home/jenkins/slave.jar
Error parsing reference: "jenkins/agent/" is not a valid repository/tag: invalid reference format
[Pipeline] // dockerNode
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.io.IOException: Failed to create docker image
at it.dockins.dockerslaves.drivers.CliDockerDriver.launchRemotingContainer(CliDockerDriver.java:176)
at it.dockins.dockerslaves.DefaultDockerProvisioner.launchRemotingContainer(DefaultDockerProvisioner.java:88)
at it.dockins.dockerslaves.DockerComputerLauncher.launch(DockerComputerLauncher.java:58)
at it.dockins.dockerslaves.DockerComputerLauncher.launch(DockerComputerLauncher.java:49)
at it.dockins.dockerslaves.api.OneShotSlave.provision(OneShotSlave.java:123)
Caused: it.dockins.dockerslaves.api.OneShotExecutorProvisioningException
at it.dockins.dockerslaves.api.OneShotSlave.provisionFailed(OneShotSlave.java:145)
at it.dockins.dockerslaves.api.OneShotSlave.provision(OneShotSlave.java:129)
at it.dockins.dockerslaves.api.OneShotSlave.createLauncher(OneShotSlave.java:154)
at it.dockins.dockerslaves.DockerSlave.createLauncher(DockerSlave.java:96)
at it.dockins.dockerslaves.pipeline.DockerNodeStepExecution$PlaceholderTask$PlaceholderExecutable.run(DockerNodeStepExecution.java:573)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:405)
Finished: FAILURE
--
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/57ecdf26-75eb-4e04-b93c-35d403283ae1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/dca1ccde-53bb-4056-ba43-68456da927d0%40googlegroups.com.
Looks like the agent image is the default one that was just set in the latest release, see https://github.com/jenkinsci/docker-slaves-plugin/commit/2d0470b27a84ddff00c3e1adc7aec9b7e8dece00
Take a look at the Docker Slaves section of the global Jenkins
configuration. The remoting image is probably set to jenkins/agent/.
Notice the final slash as Slide mentions, I believe the
specific error you experience would go away by removing that
final slash.
Anyhow, that would probably not work for you no matter what. Since you are using a Windows Docker instance then you will need Windows images for the remoting image and the SCM image. But I have no idea if the volume mounts would work there. You might be right that this part is hardcoded to Linux.
/Jacob
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzm_ia4FF7oxQipYuWwTR%2BOGBUchcrm6yy80%2Bd7Zna2DJw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzm_ia4FF7oxQipYuWwTR%2BOGBUchcrm6yy80%2Bd7Zna2DJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e57f2fcc-af2f-f59e-4844-3654e19e94d8%40larsen.net.
--
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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1ce34aee-8be4-4065-b189-4f27c079e781%40googlegroups.com.
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/41050b00-f6f2-4f56-9607-a1e8e8aadb78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/41050b00-f6f2-4f56-9607-a1e8e8aadb78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-
"Esta mensagem do SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), empresa pública federal regida pelo disposto na Lei Federal nº 5.615, é enviada exclusivamente a seu destinatário e pode conter informações confidenciais, protegidas por sigilo profissional. Sua utilização desautorizada é ilegal e sujeita o infrator às penas da lei. Se você a recebeu indevidamente, queira, por gentileza, reenviá-la ao emitente, esclarecendo o equívoco."
"This message from SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO) -- a government company established under Brazilian law (5.615/70) -- is directed exclusively to its addressee and may contain confidential data, protected under professional secrecy rules. Its unauthorized use is illegal and may subject the transgressor to the law's penalties. If you're not the addressee, please send it back, elucidating the failure."
--
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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c027f377da0189d5277bdd934f925defc5e61f25%40serpro.gov.br.
Wouldn't you need a Windows SCM image as well?
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANMVJz%3DeRyhZTX4%2BJzHrZZFq-T6ZttXhSXa%2Bke5MFgWbnJVu_A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANMVJz%3DeRyhZTX4%2BJzHrZZFq-T6ZttXhSXa%2Bke5MFgWbnJVu_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/649b7a6b-9c45-99a8-0b2f-e4185545585c%40larsen.net.