Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Using Jenkins in the Red Hat CI/CD Ecosystem

 

September 13, 2016
James Falkner
Related topics:
CI/CDContainersDevOpsLinuxKubernetesMicroservices
Related products:
Streams for Apache KafkaRed Hat JBoss Enterprise Application PlatformRed Hat OpenShift Container Platform

Share:

    The last 4-5 years have seen the debut of many new software products specifically targeting both infrastructure services and IT automation. The consumerization of IT has caused its architects to take a fresh look at their existing, often times monolithic apps and IT infrastructure and asking: Can we do better? How do I keep IT relevant? How do I keep track of all these VMs and data? How do I scale out my IT environment without a huge budget increase or physical buildout? How do I develop and get bits to production faster and with higher quality?

    These organizations are looking to evolve their development and deployment processes to be more agile and accelerate time-to-market. They are trying to embrace things like DevOps and Continuous Deployment to do that. They are breaking monolithic apps out into microservices that can be independently updated, with a focus on speed and agility, so their apps can be more reactive to changes in their business. They are evolving from traditional virtualization to public and private cloud deployments.

    There are strong parallels between the way open source communities produce great software and how IT orgs build and deliver great software and services. Red Hat, a recognized pioneer in open source, is using its deep experience in open source to build products that support microservice-oriented, DevOps-embracing, container and cloud-centric IT shops.

    Jenkins

    During my discussions these types of Red Hat customers, the average time it takes from the first mention of CI/CD or DevOps to the first mention of Jenkins is around 5 seconds. And it's no surprise -- this evolution to modern app dev means that the best supporting tools - the preferred axes and grindstones of dev - consistently rise to the top in terms of usage. And the clear leader in this particular space is Jenkins.

    Many Red Hat products and projects support, complement, or implement CI/CD/DevOps initiatives, and we'll be at JenkinsWorld this week in Santa Clara to talk about how Red Hat can help companies innovate faster with our DevOps-native products. Let's look at some of those those use cases:

    Jenkins Plugins

    If you're a Jenkins user already, you're undoubtedly familiar with the huge number of official Jenkins plugins within its ecosystem. Some of these plugins are actively maintained by Red Hat, and some maintained by others in the Jenkins community. They provide a clean integration between Jenkins and Red Hat products and projects that are typically used in the context of DevOps:

    Jenkins WildFly / JBoss EAP Plugin
    Jenkins WildFly / JBoss EAP Plugin

    WildFly / JBoss EAP plugin - Enables Jenkins to automatically deploy apps to local or remote, standalone or domain WildFly and/or JBoss EAP (including EAP 7!). Can be used as Build Step. More examples in Deon's excellent blog on EAP 7 deployment with Jenkins.

    Ansible plugin - This plugin lets you invoke Ansible playbooks using Jenkins and Ansible Core. You can also use Dynamic Inventories from places like Cobbler, OpenShift, OpenStack, Amazon EC2 and more.

    Kubernetes plugin - The base Kubernetes plugin primarily exists to allow you to dynamically provision Jenkins slaves within a Kubernetes cluster, for scalability as well as providing pods with specific runtimes for specific jobs. It supports several different authentication schemes (service accounts, OAuth tokens, and more). And while it is very useful for the average Jenkins user, if you are using this chances are you are using Kubernetes and/or OpenShift for more than just hosting Jenkins slaves - see below for the other use case for Jenkins+Kubernetes/OpenShift!

    OpenShift Sync plugin - Specific to the OpenShift PaaS use case are two plugins - the first is the OpenShift Sync plugin. As its name suggests, this plugin synchronizes the state of OpenShift Builds and BuildConfigs with the state of Jenkins and Jenkins Jobs. Useful when you use Jenkins as a CI/CD component of a much larger developer integration/build/test/deploy/manage platform (which is exactly what fabric8 does, and is where the source code to this plugin resides - see below for details!).

    jenkins-ose
    Typical Jenkins/OpenShift CI/CD deployment architecture (image courtesy Andy Pemberton @ CloudBees)

    OpenShift Pipeline plugin - Jenkins provides support for defining jobs as a pipeline of steps which can be repeatedly executed, and whose state can be visualized within Jenkins or rendered elsewhere by monitoring through the Jenkins API. Plugins can provide components that can be used within the definition of pipelines, which is what this plugin does. It exposes much of OpenShift's functionality (such as triggering builds/deployments, promoting images from dev to test to production, or scaling deployed apps). It makes it easy to define new jobs (either using Build steps or as a pipeline, using the DSL support provided by the plugin).

    Jenkins support/integration in Red Hat

    Red Hat has several products and projects that are often involved in one way or another in CI/CD/DevOps initiatives. The uses cases are many (it's lifecycle infrastructure for any kind of app, after all!) so I won't go into those here. But suffice it to say, you'll find JBoss Middleware, OpenShift, fabric8 and Ansible at the heart of many a Red Hat customers' programs. Those same programs integrate with Jenkins in several different ways described below:

    Jenkins with OpenShift

    Jenkins is a first-class citizen of the OpenShift ecosystem, and there are several aspects that make them a great combination:

    • Official S2I images - OpenShift Origin provides a Docker image for running Jenkins. This image provides a Jenkins server instance which can be used to set up a basic flow for continuous testing, integration, and delivery. You can create a custom version of this (for example, to include custom Job descriptions, Jenkins configuration, credentials, plugins, etc).
    • Label-based slave deployment - when using the official Jenkins images (or a derivative that you've created), OpenShift will configure Jenkins to use it as a slave deployment platform, and deploy slaves dynamically from image streams labelled with role=jenkins-slave.

    Using these features, along with the previously mentioned features from plugins means that you can implement your own deployment pipeline automated with the Pipeline plugin for deploying to OpenShift, complete with source to image creation, advanced test phases, gated approvals, and deployments, using the best of OpenShift and Jenkins.

    OpenShift 3.3 will go even further and bake in much of the above feature set directly into OpenShift (powered by Jenkins!). Check out Steve's Early Look at OpenShift 3.3 for more details.

    33-pipe
    OpenShift 3.3 Tech Preview - Pipelines

    Jenkins with Ansible Tower

    Jenkins and Ansible are often used together to handle various aspects of a CI/CD solution. As we all know, before CD can be achieved, the first step is to achieve CI. CI systems are build systems that watch various source control repositories for changes, run any applicable tests, and automatically build (and ideally test) the latest version of the application from each source control change, such as Jenkins.

    The key handoff for CD is that the build system can invoke Ansible upon a successful build. Users who also run unit or integration tests on code as a result of the build will also be one step ahead of the game. Jenkins can use Ansible Tower to deploy the build artifacts into dev, test, prod, or some combination. The data provided back by Ansible can then be referenced, and directly correlated to a Tower job in the Build Systems job.

    If you're attending JenkinsWorld this week, don't miss Dylan's talk on Jenkins with Ansible Tower, which includes a sneak peak at an even deeper integration between the two very popular products in the near future.

    Jenkins with fabric8

    Building a fabric8 project with integrated Jenkins pipeline
    Building a fabric8 project with integrated Jenkins pipeline - James Rawlings

    fabric8 describes itself as "an opinionated open source microservices platform based on Docker, Kubernetes and Jenkins." Red Hat has enthusiastically sponsored and participated in the fabric8 community, which selected Jenkins as the default and recommended implementation for CI/CD. Specific Jenkins-related features include:

    • A reusable pipeline library such that projects no longer have to maintain their own pipeline definition when in most cases, projects will use the same pipeline (build; test; stage; wait for approval; promote).
    • The fabric8 Maven plugin can connect to various DevOps services provided through fabric8 like git hosting, chat, issue tracking and CI/CD builds in jenkins.
    • Teams often have many git repositories with many artifacts and docker container builds. Manually maintaining individual Jenkins build configurations for each git repository can be time consuming and error prone, so fabric8 provides a way to use the Jenkins Job DSL to generate job definitions for your projects. This is one of the coolest and most DRY-ish solution I've ever seen for automating Jenkins config.

    Jenkins on Red Hat OpenStack Platform

    All of the components and frameworks and integrations above must run somewhere, and that somewhere is increasingly found on public, private or hybrid clouds. For large deployments that need enterprise-grade cloud infrastructure for their DevOps initiatives, consider the combination of Red Hat OpenStack Platform and CloudBees Jenkins Platform. It's a great combination of rockstar solutions that use familiar technology you're already using, supported by companies that are also significant open source contributors to the respective upstreams.

    If you're at JenkinsWorld this week, be sure to visit the Red Hat booth, and don't miss these sessions:

    DevOps Native (BoF)
    David Codelli, Red Hat
    Wednesday 5:00pm Exhibit Hall A-2

    CI/CD with Jenkins and Ansible Tower
    Dylan Silva (@Thaumos),Red Hat
    Thursday 1:30pm Exhibit Hall A-3

    How to do continuous delivery with Jenkins Pipeline, Docker and Kubernetes
    James Strachan (@jstrachan), Red Hat
    Thursday 2:30PM Great America J

    Last updated: June 22, 2023

    Recent Posts

    • Container starting and termination order in a pod

    • More Essential AI tutorials for Node.js Developers

    • How to run a fraud detection AI model on RHEL CVMs

    • How we use software provenance at Red Hat

    • Alternatives to creating bootc images from scratch

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue