Skip to content

A repo containing code for a modern Docker + Jenkins CI / CD System

Notifications You must be signed in to change notification settings

Cervator/modern-jenkins

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerized Jenkins Build System

This repo contains an example of a fully automated Jenkins & Docker build system. It was originally developed as part of a tutorial on the following blog: The CI/CD Life

It has been adopted by a new maintainer intending to take it further :-)

Table of contents

Here are links to the originally available tutorial sections:

Please follow along the original tutorial if you'd like to learn how to deploy a a Modern Jenkins Infrastructure on Docker!

New stuff

Beyond the original tutorial covering mostly base Jenkins and Docker topics some new topics have been added, with details in internal PRs:

  • PR #1 - Adding a Vagrant box to run Docker inside
  • PR #2 - Better Gradle and Groovy integration
  • PR #3 - Hooking up Job DSL including samples (later enhanced further)
  • PR #4 - Hobo GitOps! Expand control further to include external DSL and Manifest repos
  • PR #5 - Use Gitea for embedded Git repos + sync files from workspace into Docker

At this stage to see the new stuff in action from a fresh clone using Vagrant do the following:

  • vagrant up to get your Vagrant box
  • vagrant ssh to get into your Vagrant box
  • cd /vagrant/images/jenkins-base + ./build.sh to build the first Docker image (the base for the other two images)
  • cd ../jenkins-master/ + ./build.sh to build the second image - this contains the Jenkins master itself
  • cd ../jenkins-plugins/ + ./build.sh to build the third and final image - this contains plugins, init scripts, and DSL stuff
  • cd ../../deploy/master/ + ./restart.sh to then actually use Docker Compose to stand up everything involved

A presentation PDF is included with the repo that covers "Hobo GitOps" - eventually a webinar recording of some sort should become available :-)

A second presentation PDF is also included for a similar talk focusing on Incident Management

Future stuff

Plans and ideas

  • Convert from boring properties files and JSON to Jenkins CasC compatible YAML but still be able to read it from utility jobs
  • Rework the Docker image setup a bit - master war into master image, split apart plugin image from init scripts and DSL, etc
  • Run several Hobo GitOps tiered masters at the same time to better showcase the promotion flow
  • Prepare hooks for various GitOps operators, like WeaveWorks Flux
  • Improve the workspace to also support development work on setting up and configure things beyond Jenkins, such as Nexus or Sonarqube
  • Include support for local manifests / environments where you can begin, then later push those into external repos (nested Git roots yay!)

About

A repo containing code for a modern Docker + Jenkins CI / CD System

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 56.0%
  • Groovy 21.4%
  • Dockerfile 16.6%
  • Batchfile 6.0%