I'm seeing a lot of docker related plugins in the community. They are
already popular, and becoming more popular for obvious reasons.

So I started looking into how to improve the story around Jenkins and
Docker, and I talked to some of you that a low-hanging fruit is to provide
some common credentials configuration across those docker related plugins,
so that people won't have to configure them repeatedly.

So I took my first stab at
https://github.com/jenkinsci/docker-commons-plugin.

The plugin contains two sets of credential+endpoint information, one for
talking to docker daemon and one for talking to docker registry. For
registry, the credential is a token (and username+password for DockerHub.)
For daemon, the credential is SSL client authentication stuff.

The endpoint combines the credential with the URL/URI of the
registry/daemon. They expose a method that helps you invoke docker CLI in
the right environment, an it hides the details of making key materials and
tokens available to docker CLI. See some code example
<https://github.com/jenkinsci/docker-commons-plugin/blob/master/src/test/java/org/jenkinsci/plugins/docker/commons/SampleDockerBuilder.java>
for details.

The endpoints are Describable, so that you can insert them into your
builder/publisher etc, and it provides all the necessary configuration GUI.

I think it has enough shape in it to get the idea across, and so I wanted
to have a conversation about that here before I release 1.0 and commit to
the backward compatibility. I'll reach out to the folks who maintain
popular docker plugins, but your thoughts are appreciated.

Just in case you want to play with the signature and so on, I published
1.0-alpha-1, but it's still missing a number of things to make it actually
runnable, such as proper Descriptor implementations and config UIs.

-- 
Kohsuke Kawaguchi

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAN4CQ4xyc_cx6v-sEcvJNyyEiYxxny0WedziX_Vz3H59Sc-qhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to