dockerjenkins_tutorial icon indicating copy to clipboard operation
dockerjenkins_tutorial copied to clipboard

Script to set up docker-plugin automatically

Open thismatters opened this issue 7 years ago • 2 comments

Have you considered including an init.groovy.d/ script to automate the setup of docker-plugin? Going through the frontend is good for the tutorial, but it is tedious to perform those steps more than once.

The docker-plugin docs has a rough template for the setup script but it excludes the pull strategy and connect method; moreover it seems like the docs are still showing deprecated usage. I understand that configuring Jenkins falls outside the scope of your guide (which is excellent by the way, thank you), but including the groovy script will expose another important aspect of automating Jenkins. Do you find that reasoning sound?

thismatters avatar Feb 07 '19 22:02 thismatters

That's actually a really good idea, internally on our own systems we do configure much of that pre-startup. You are correct that I left it out of this guide because I wanted people to understand the very small basics, but if I were to fully automate this the basic setup would be in init.groovy.d/ such that it would just work on startup (my internal version at work just does that to the point where you deploy, then click on a "testme" job that verifies everything is working).

I need to tweak my work ones to be "public safe" but that's a great addition. Thanks for the feedback!

maxfields2000 avatar Feb 07 '19 22:02 maxfields2000

Thanks for your guide!

thismatters avatar Feb 09 '19 13:02 thismatters