Docker plugin and Docker Build step plugin dont work together

462 views
Skip to first unread message

Stuart Leitch

unread,
Jun 17, 2015, 11:55:32 AM6/17/15
to jenkin...@googlegroups.com
Hello, we have Docker plugin (0.9.3) and Docker build step plugin (1.2.5).

After install of Docker Plugin (and after restart), the docker build step job steps (and any already configured steps) disappears from the job configuration UI (still in xml).

Doesn't matter what order installed in.

Exception in log is:

Jun 17, 2015 3:24:47 PM WARNING hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
Failed to instantiate Key[type=org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl, annotation=[none]]; skipping this component
com.google.inject.ProvisionException: Guice provision errors:

1) Error injecting constructor, java.util.ServiceConfigurationError: com.github.dockerjava.api.command.DockerCmdExecFactory: Provider com.github.dockerjava.jaxrs.DockerCmdExecFactoryImpl not a subtype
  at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl.<init>(Unknown Source)


Any ideas? Similar to 'JENKINS-28755'?

Cheers/Stuart



.

牟俊秋

unread,
Feb 1, 2016, 4:04:35 AM2/1/16
to Jenkins Developers
running into the same problem, have you fix this?

在 2015年6月17日星期三 UTC+8下午11:55:32,Stuart Leitch写道:

Oleg Nenashev

unread,
Feb 9, 2016, 1:22:25 PM2/9/16
to Jenkins Developers, Kanstantsin Shautsou
It's a known issue with library shading.
Docker Java does not retain backward compatibility, so plugins depending on different versions may blow up.
For the reference, https://issues.jenkins-ci.org/browse/JENKINS-28755

Added Kanstantin Shatsou to Cc, he may provide resolution guidelines.

BR, Oleg

понедельник, 1 февраля 2016 г., 3:04:35 UTC-6 пользователь 牟俊秋 написал:

Kanstantsin Shautsou

unread,
Feb 13, 2016, 3:57:04 PM2/13/16
to Jenkins Developers, kanstan...@gmail.com
On Tuesday, February 9, 2016 at 9:22:25 PM UTC+3, Oleg Nenashev wrote:
It's a known issue with library shading. 
Docker Java does not retain backward compatibility, so plugins depending on different versions may blow up.
Backward compatibility of docker-java is not a problem. Any two plugins that providing the same library will conflict in jenkins. 
Problem in jenkins and in core classloader.

For the reference, https://issues.jenkins-ci.org/browse/JENKINS-28755

Added Kanstantin Shatsou to Cc, he may provide resolution guidelines.
I unreally tired with all this issues. Build patched maven-shade-plugin (see MSHADE-182), review jar internals, spend 1 months searching for maven-shade-plugin devs/maintainers, etc.
Real fix should be done in core classloader. (Wait for Jenkins 2.0?) 

PS IMHO build-step plugin is useless because it will be always behind of newer docker features that should be developed and provided in UI. Just use docker binary (Either install with tools installer or package into docker slave image) and call it with required build arguments from shell step. Docker-plugin injects host address in build env vars so you can easily do build/push of image from shell out of the box.

牟俊秋

unread,
Feb 14, 2016, 8:17:57 PM2/14/16
to Jenkins Developers, kanstan...@gmail.com
thanks. now i just use one docker plugin. I run into this problem because I try to install docker-build-step and  Docker plugin the same time. Now I just use docker-build-step, and it work just fine.
Kanstantsin Shautsou <kanstan...@gmail.com>于2016年2月14日周日 上午4:57写道:
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/0z6xkg2CTSg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/9977f8c6-6405-4f07-be0d-98de5808491e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jesse Glick

unread,
Feb 16, 2016, 12:45:42 PM2/16/16
to Jenkins Dev
On Sat, Feb 13, 2016 at 3:57 PM, Kanstantsin Shautsou
<kanstan...@gmail.com> wrote:
> Any two plugins that providing the same library will conflict in jenkins.

Only if the library is buggy. As in my last comment in JIRA,
`DockerClientBuilder` needs a fix. The easiest workaround on the
plugin side is to temporarily set the `Thread.currentClassLoader`.
Reply all
Reply to author
Forward
0 new messages