maxfields2000 / dockerjenkins_tutorial

A repository for items learned in my Getting Started with Jenkins and Docker tutorial series
Apache License 2.0
737 stars 326 forks source link

Script to set up docker-plugin automatically #53

Open thismatters opened 5 years ago

thismatters commented 5 years ago

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?

maxfields2000 commented 5 years ago

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!

thismatters commented 5 years ago

Thanks for your guide!