Jenkins & Cloudbees
Jenkins & CloudBees¶
- Jenkins
- Groovy
- Awesome Jenkins
- Jenkins Cheat Sheet
- Online Learning
- Jenkins Configuration as Code Solutions. 3 available DSLs
- Jenkins Architecture. Performance and Scalability
- Ansible and Jenkins. Running Ansible Playbooks From Jenkins
- Jenkins Tools
- Jenkins Multibranch Pipeline
- Jenkins Plugins
- Monitoring jenkins
- Jenkins and Spring Boot
- Kubernetes Native Jenkins Operator
- CloudBees
- Jervis: Jenkins as a service
- Jenkins X
Jenkins¶
- CloudBees
- Wikipedia.org: Jenkins Software
- Jenkins.io (new Jenkins 2.0 site) π
- jenkinsci.github.io π
- Official Jenkins Docker image
- github.com/jenkinsci π
- reddit.com/r/jenkinsci π
- dzone: getting started with jenkins the ultimate guide
- dzone: jenkins in a nutshell
- opensource.com: running jenkins builds containers π
- WebSocket support in now available for Jenkins CLI and agent networking!
- webhookrelay.com: Receive Github webhooks on Jenkins without public IP π
- Dzone refcard: Jenkins on PaaS Continuous Integration with Jenkins for Java Projects. Includes a review of the most useful plugins, best practices, security, integration to an enterprise environment, and more.
- jenkins.io 2020-05-06: Slave to Agent renaming. Renaming of the official Docker images for Jenkins agents We would like to announce the renaming of the official Docker images for Jenkins agents. The “slave” term is widely considered inappropriate in open source communities. It has been officially deprecated in Jenkins 2.0 in 2016, but there are remaining usages in some Jenkins components.
- Windows Docker Agent Images: General Availability π
- jenkinsistheway.io: Jenkins Is The Way π Jenkins Is The Way is a collection of experiences from all around the world showcasing how users are building, deploying, and automating great stuff with Jenkins.
Groovy¶
- Wikipedia.org: Groovy
- Dzone: Introduction to Groovy
- Dzone refcard: Groovy, a Rapid-Development JVM Language
Awesome Jenkins¶
Jenkins Cheat Sheet¶
Online Learning¶
- udemy.com: Master Jenkins CI For DevOps and Developers
- udemy.com: Learn DevOps: CI/CD with Jenkins using Pipelines and Docker Use Jenkins the DevOps way. Automate your Jenkins jobs by using Jenkins Pipelines, Docker, and the Jenkins Job DSL
- wardviaene/jenkins-course π
Jenkins Configuration as Code Solutions. 3 available DSLs¶
- Job DSL was one of the first popular plugins for Jenkins which allows managing configuration as code and many other plugins dealing with this aspect have been created since then, most notably the Jenkins Pipeline and Configuration as Code plugins. It is important to understand the differences between these plugins and Job DSL for managing Jenkins configuration efficiently.
- In consequence 3 DSLs are available to configure jenkins as code:
- DSL 1: Job DSL
- DSL 2: Jenkins (Declarative) Pipeline
- DSL 3: Jenkins Configuration as Code (JCasC)
- Tip: Don’t stay with manually configured freestyle jobs. Use JobDSL wrapper if you can’t use Pipeline.
DSL 1. Job DSL Plugin. From Freestyle jobs to Declarative Pipeline¶
- Jenkins Job DSL API used in jenkins declarative pipelines.
- Job DSL Plugin π
- github.com/jenkinsci/job-dsl-plugin
- Jenkins Job DSL Plugin documentation A Groovy DSL for Jenkins Jobs - Sweeeeet!
- Jenkins Job DSL API π
- job-dsl Gradle Example
- Jenkins DSL for Nexus
- Jenkins DSL for Maven:
- Pipeline Global Library for ci.jenkins.io Collection of custom steps and variables for our Jenkins instance(s)
DSL 2. Jenkins Pipeline. Pipeline as Code with Jenkins¶
- Pipeline as Code with Jenkins π
- jenkins.io - doc/book/pipeline π
- jenkins.io - jenkinsfile π With version 2 of the Jenkins Continuous Integration/Continuous Delivery (CI/CD) server, a new job definition file has been introduced, called Jenkinsfile. The initial Jenkinsfile format was based on Groovy. As groovy knowledge is not that widespread, a new and more straight forward was published in spring 2017. This format is called Declarative Pipeline. This visual studio code extension is aimed at making the manipulation of this file type easier.
- Dzone refcard: Continuous Delivery with Jenkins Workflow π
- GitHub Gist - Faheetah/Jenkinsfile.groovy: Jenkinsfile idiosynchrasies with escaping and quotes
- jenkins.io: Jenkins CD and Pipelines Microsite
- dzone.com: Jenkins Pipeline - Software Delivery Made Easy Jenkins 2.0 has focused on solving the problem for organizations wanting to continuously deliver software.
- DZone refcard: declarative pipeline with jenkins π
- sdtimes.com: CI/CD pipelines are expanding π The βbasicβ CI/CD pipeline includes five processes, which are: merge, build, test, package and deploy. All of these are individually defined so readers have a common reference point. The basic pipeline includes sub-pipelines associated with each step, such as moving artifacts from a build into a repository.
- magalix.com: Create a CI/CD pipeline with Kubernetes and Jenkins (Ansible, Docker, Golang App) π
- dzone: learn how to setup a cicd pipeline from scratch π
- dzone: how to use basic jenkins pipelines
- opensource.com - building cicd pipelines with jenkins π
- opensource.com: Jenkins Pipeline as Code Tutorial For Beginners π
- loves.cloud: CI/CD Pipeline Using Docker and Jenkins
- medium: jenkins cicd getting started with groovy and docker
- Dzone: Top 10 Best Practices for Jenkins Pipeline
- opensource.com - Introduction to writing pipelines-as-code and implementing DevOps with Jenkins 2
- thoughtworks.com: Modernizing your build pipelines π
Extending with Shared Libraries¶
- Shared-libraries are not recommended since more coding involves more maintenance issues. Use Declarative Pipelines as much as possible.
- Extending with Shared Libraries π
Automating Service Level Indicators/Service Level Objectives based build validation with Keptn and Jenkins¶
- Keptn provides automated SLI/SLO-based quality gates
- Keptn Jenkins Shared Library integrates Jenkins and Keptn with just a couple of function calls.
- Jenkins Online Meetup Andreas Grabner from Dynatrace will talk about automating Service Level Indicators/Service Level Objectives based build validation with Keptn and Jenkins.
- In many organizations up to 80% of pipeline execution time is spent in manual build validation steps. How can we reduce that? One option is applying Google’s SRE (Site Reliability Engineering) practices by automating SLI (Service Level Indicators) & SLO (Service Level Objectives) based build validation. This method has proven to detect problematic issues in production and also allows us to automatically approve or reject builds being pushed through our pipelines.
- In this session you learn the basics of picking good SLIs & SLOs and how to extract them from your monitoring tools. After this session you will be able to start implementing this integration yourself with Jenkins. To give you a jump start you will be introduced to the open source project Keptn which provides automated SLI/SLO-based quality gates. Then we’ll talk about Keptn Jenkins Shared Library which integrates Jenkins and Keptn with just a couple of function calls.
- youtube: Level-Up your Jenkins-based Delivery with Keptn
DSL 3. Jenkins Configuration as Code (JCasC)¶
- Jenkins Configuration as Code Plugin
- devops.com: Using jenkins configuration as code
- opensource.com: Getting started with Jenkins Configuration as Code π JCasC uses YAML formats to set up Jenkins configurations.
- dzone.com: Jenkins Configuration as Code: Need for Speed! π
- Dzone: Running Jenkins Server With Configuration-as-Code π Take a look at the new plugin for Jenkins that allows you to to create pipelines using YAML! Let’s check out the details and examples.
- docs.cloudbees.com: Configuration as Code for CloudBees Core on modern cloud platforms
- cloudbees.com: CloudBees Core Configuration as Code
- Visual Studio Code JCasC-Plugin π This extension is used to integrate a live jenkins instance configuration with your editor. It can be used to edit and validate YAML files.
- Example of Configuration as Code of Jenkins (for Kubernetes) π
- JEP-224: System Read permission: Improve experience of Jenkins Configuration-as-Code users It improves the modifying Web UI configuration controls to support the read-only mode.
Read-only Jenkins Configuration¶
- Read-only Jenkins Configuration π This feature allows restricting configuration UIs and APIs while providing access to essential Jenkins system configuration, diagnostics, and self-monitoring tools through Web UI. Such mode is critical for instances managed as code, e.g. with Jenkins Configuration-as-Code plugin. It is delivered as a part of the JEP-224: Read-only system configuration effort.
Jenkins Architecture. Performance and Scalability¶
- devopscube.com: Jenkins Architecture Explained β Beginners Guide
- dzone: how to setup scalable jenkins on top of a kubernetes cluster
- devops.com: kubernetes jenkins master slave scalability
- rancher.com: scaling jenkins
- rancher.com: Deploying and Scaling Jenkins on Kubernetes π
- jenkins.io - Tuning Jenkins GC For Responsiveness and Stability with Large Instances π
- dzone.com: How to Set Up Scalable Jenkins on Top of a Kubernetes Cluster π
- devops.com: Kubernetes Jenkins Master-Slave: Scaling the Scalability Issue
- 7 Ways to Optimize Jenkins
- devopscube.com: How to Setup Docker containers as Build Slaves for Jenkins
Ansible and Jenkins. Running Ansible Playbooks From Jenkins¶
- Dzone: Running Ansible Playbooks From Jenkins
- itnext.io: Ansible and Jenkins β automate your scritps π
- ansible-role-jenkins Installs Jenkins CI on RHEL/CentOS and Debian/Ubuntu servers.
Jenkins Tools¶
- Jenkins CLI
- How to create initial “seed” job
- Jenkinsfile Runner Test Framework
- Jenkins Pipeline Unit testing framework
- Plugin Installation Manager Tool
- Jenkins Custom WAR Packager
Jenkins Multibranch Pipeline¶
- The Multibranch Pipeline π enable developer to implement different Jenkinsfiles for different branches of the same project. Itβs can discover branches and execute pipeline automatically with Jenkinsfiles in version control for better management pipeline.
Multibranch Pipelines with Kubernetes¶
Jenkins Plugins¶
- dev.to: 8 Jenkins plugins I can’t live without (2019)
- caylent: 20 Jenkins Plugins You Canβt Live Without (2018) π
- blazemeter.com: Top Jenkins Plugins You Canβt Miss in 2018
- dzone: Top 5 Jenkins Plugins (2017)
- devops.com: 15 must have Jenkins plugins to increase productivity
- jrebel.com: Top 10 Jenkins Plugins and Features (2014)
- devteam.space: 10 Best Jenkins Plugins For DevOps
- devops.com: Top 10 Best Practices for Jenkins Pipeline Plugin π
Selection of Jenkins Plugins¶
- Job DSL Plugin π
- Jenkins Job DSL API π
- Jenkins Job DSL Plugin documentation A Groovy DSL for Jenkins Jobs - Sweeeeet!
- Jenkins Configuration as Code
- performance-plugin
- Matrix π
- Compress-buildlog
- syslog-logger
- openshift-pipeline
- openshift-sync
- openshift-client
- openshift-login
- openshift-deployer
- kubernetes plugin
- Kubernetes Continuous Deploy π
- Kubernetes CLI π
- Atlassian’s new Bitbucket Server integration for Jenkins π
- Blue Ocean π
- Cloudbees Flow π
- Cloudbees Credentials π
- CloudBees Health Advisor
- CloudBees Disk Usage Simple
- CloudBees AWS Credentials π
- CloudBees Docker Custom Build Environment
- Code Average API
- Fortify
- SonarQube Scanner π
- SonarScanner for Jenkins π SonarQube plugin for Jenkins with declarative pipeline
- medium: ECS Jenkins Plugin to create ephemeral Slaves in Fargate
- Pipeline: SCM Step (workflow-scm-step) The following plugin provides functionality available through Pipeline-compatible steps.
- Amazon EC2 plugin
- Copy Artifact
- Credentials Binding
- CVS plugin
- SCM Filter Jervis YAML Plugin This plugin is intended for Jenkins infrastructure relying on jervis to deliver software in a self-service manner. This plugin can also be used for Travis CI YAML.
- Deploy Dashboard by Namecheap
- Plugin Usage This plugin gives you the possibility to analyze the usage of your installed plugins.
- Pipeline as YAML (Incubated) π
- Least Load This plugin overrides the default Load Balancer behavior and assigns jobs to nodes with the least load
- Declarative Pipeline Migration Assistant π
Plugin Development. Jenkins Plugin Parent POM 4.0¶
- Plugin Development
- Plugin Development: Dependency Management
- Parent POM for Jenkins Plugins. Plugin POM 4.0 This new parent POM is decoupled from the core Jenkins project, both from the Maven and repository perspectives.
- 4.0 changelog
- Maven is widely used for Jenkins plugin development, more than 90% of plugins use it. In order to simplify plugin development, the Jenkins project offers a standard Parent POM which defines the recommended build, verification and release flow. Such parent POM helps us to ensure quality of the Jenkins plugins. In April 2020 we released a new major release of the parent POM which includes a number of important and sometimes incompatible changes: Jenkins core Bill of materials, full migration to SpotBugs, etc.
- In this presentation James Nord will talk about the changes introduced in Plugin POM 4.0. What do plugin developers and users get by upgrading? How to upgrade? What obstacles to expect, and how to resolve them?
Jenkins Blue Ocean¶
Cloudbees Flow¶
Monitoring jenkins¶
- Performance plugin
- Splunk Plugins
- Logstash
- Build Monitor Plugin
- Monitor Pro Plugin
- ALM Performance: Continuously Monitor Performance and Vitality of your Jenkins Deployment
- Monitoring jenkins using instana
- medium: prometheus and grafana dashboard
- youtube: Monitoring Jenkins with Grafana and Prometheus
- dynatrace.com: optimizing jenkins to ensure fast build times with dynatrace
- opsview.com: opspack
- Chrome Extension
- Jenkins plugin to provide automatic status for multibranch jobs (Grafana)
- 20 Jenkins Plugins You Canβt Live Without
- youtube - CloudBeesTV: Jenkins Performance: Avoiding Pitfalls, Diagnosing Issues & Scaling for Growth
Jenkins and Spring Boot¶
- jaxenter.com - CI/CD for Spring Boot Microservices
- piotrminkowski.wordpress.com: Kotlin microservice with spring boot
Kubernetes Native Jenkins Operator¶
- github.com/jenkinsci/kubernetes-operator: π Kubernetes platform was released ten years after the first version of Hudson project. It means Jenkins couldnβt be designed to run on top of it. Jenkins Operator tries to bridge that gap.
CloudBees¶
CloudBees Rollout and Feature Flags¶
- CloudBees Rollout π
- rollout.io: CloudBees Rollout Tutorial: Feature Flagging in your React Native App in 5 minutes
- How to Disable Code: The Developer’s Production Kill Switch π
Feature Flags in CloudBees Enterprise On-Premise¶
- CloudBees Releases Another Industry First: Feature Flagging for On-Premise Use π
- SAN JOSE, CA. β May 5, 2020 β CloudBees, Inc., the enterprise software delivery company, today announced a new release of CloudBees Feature Flags that enables developers to manage production deployments of new functionality in a controlled manner with an on-premise feature manager. The new offering strengthens CloudBeesβ leadership in the continuous integration/continuous delivery (CI/CD) space by extending usersβ ability to leverage feature flag technology in both on-premise and cloud environments. CloudBees Feature Flags is from the company and application formerly known as Rollout, acquired last year by CloudBees.
- Feature flags have emerged as popular tools for deploying new features with the added advantage of enabling risk-free experimentation and fast results. As organizations enhance applications with rich new capabilities, many use feature flags to preview features for select audiences, with the ability to pull them back quickly if the functionality is not successful. In a recent survey, 97% of respondents say that it is important for their organization to implement new application features quickly, yet 65% say it is difficult for their organization to do so safely. CloudBees Feature Flags enables developers to easily release new features with confidence, reduce risk in doing so and manage large numbers of feature flags at scale.
- βVery soon, all features will be released behind a feature flag. Itβs a natural evolution in continuous delivery. CloudBees has led the way in feature flag technology, making it a core part of our overall offering,β said Sacha Labourey, CEO and co-founder, CloudBees. βWith this release, we are providing the same functionality for on-premise environments that previously had only been available as a cloud-based service. We are committed to the ongoing integration, automation and governance of feature flags within the software delivery lifecycle and giving users choice in selecting the best environment for their project β on-premise or cloud.β
- CloudBees Feature Flags integrates with the companyβs deep CI/CD capabilities, giving organizations the most comprehensive feature management capabilities in the software development life cycle (SDLC). The ability to use feature flagging in an on-premise environment also opens up new avenues for usage in industries, such as government, finance, pharmaceuticals, utilities and healthcare, where there can be a mix of on-premise and cloud environments.
- βWe recognize that many companies are realizing the benefits of feature flags,β said Moritz Plassnig, senior vice president and general manager, Software Delivery Management and Software Delivery Automation Cloud at CloudBees. βBy flagging features, they no longer have to sacrifice innovation to lower risk. We felt that it was critical to offer this technology to any company working in on-premise or hybrid environments.β
CloudBees Accelerator¶
- CloudBees Accelerator Shorten Build and Test Times
- How to Speed Up Software Development with Build and Test Acceleration Tools
Jervis: Jenkins as a service¶
- Jervis is Sam Gleske‘s vision of a good way to roll out Jenkins as a service in very large organizations.
- SCM Filter Jervis YAML Plugin This plugin is intended for Jenkins infrastructure relying on jervis to deliver software in a self-service manner. This plugin can also be used for Travis CI YAML.
Jenkins X¶
Jenkins X is a specialized Jenkins for Kubernetes: This is how it works from a bird eye the CI/CD: a developer creates a branch, then Jenkins X creates a ephemeral namespace with that branch. The developer tests it and once it is ok, a PR is created, then, the branch is deployed in staging. When I merge it, it goes to QA, and with a manual command “jx promote” it goes to production. Jenkins X deletes automatically after N hours the branch namespace.