Automating a Custom Jenkins in OpenShift 3.x with Your Plugins and Your Configuration

How Jenkins works within OpenShift

Jenkins application in your OpenShift project

How you can make Jenkins customized for YOUR projects easily

  • A plugins directory containing specific plugin binary objects you wish. I only did this with plugins that I received from paid-software-subscriptions that I cannot get out on GitHub or GitLab and the like.
  • A plugins.txt file that has a list of plugins to install outside of the generic ones in the format of “plugin-name:pluginVersion”. I always use “latest” for my pluginVersion as you can see from my file in my GH repo.
  • A configuration/jobs directory with job definitions if you have them. I did not include any.
  • A configuration/config.xml file for custom configuration. I did not include this either for now.
  • Any other files from the configuration directory in Jenkins you wish to copy in, i.e. credentials.xml
GH repo for a custom Jenkins image

Building the Custom Jenkins Image and Using It

Image Stream definition for a custom Jenkins
BuildConfig for the custom Jenkins image
Specifying the custom Jenkins image for your project’s Jenkins

Possible Scenarios for Custom Jenkins in OpenShift

  1. You could have every single plugin you need for your organization or OpenShift platform in the jenkins:latest image in the openshift namespace and call it a day. That is quick and easy and just works. If/when you update to the next version I am not sure how well that will treat you but you have to try and then find out.
  2. You could leave the jenkins:latest alone and then have a different tag like jenkins:companyname that you pull into your deployment templates for your projects that need the “company compliant” Jenkins under configuration management.
  3. You could have a custom Jenkins image with a custom name (or names) that has pre-built Jenkins plugins and configuration that match the Config Maps for your Jenkins Slave Agent images and let people pick the one they need. I would guardrail this and structure it or you will have n+1 for every n projects you make. Developers love to believe their setup is the only one and is custom only to them! (Trust me. I Are One.)
  4. You could let your users create their own in their own namespace/project and give them the tools to do so if you wish to let them control their own destiny.
  5. Others that you are now thinking of…

More Reading…




CEO of Soteria Software. Developer on OpenRMF. Software Geek by trade. Father of three daughters. Husband. Love new tech where it fits. Follow at @soteriasoft

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Long Running Actions with Helidon

How to setup your Android app to use Protobuf

map and flatmap in Java8

Sorting :

A CXO’s Primer on Cloud

Towards Observability-Driven Development…

My Flatiron Journey

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dale Bingham

Dale Bingham

CEO of Soteria Software. Developer on OpenRMF. Software Geek by trade. Father of three daughters. Husband. Love new tech where it fits. Follow at @soteriasoft

More from Medium

How to Configure GitLab Web-hook in Jenkins ??!

How to Setup Master and Slave Architecture using Jenkins? (CI/CD)

Publishing Jenkins Job build status to GitLab

How to Setup a Jenkins to Dockerhub Pipeline with Multi-Arch Images