Jenkins Continuous Integration Bootcamp

Tags: Jenkins

An introduction to the Jenkins build server using continuous integration and deployment techniques -- all step by step.

Last updated 2022-01-10 | 4.5

- Install Jenkins CI server on Windows
- Install and configure several tools commonly used with Jenkins
- Understand the basics of continuous inspection
- continuous integration
- and continuous deployment

What you'll learn

Install Jenkins CI server on Windows
Install and configure several tools commonly used with Jenkins
Understand the basics of continuous inspection
continuous integration
and continuous deployment
Use Jenkins effectively to build
test
analyze and deploy Java projects
Apply the techniques and experience to implement Jenkins and/or a continuous integration system

* Requirements

* Basic computer skills
* Ability and access to install software (admin rights required)
* Desire to learn something new

Description

This is a comprehensive course designed to show how to setup and run a Jenkins CI server starting with continuous inspection (build, test and analysis) all the way through to continuous deployment. This course provides a strong foundation for implementing continuous inspection, continuous integration, continuous delivery, and even continuous deployment at your company or studio. In order to ikeep the course short and to-the-point, several decisions were made in order to provide a complete path from CI to CD.

The pipeline created in this course consists of the following:

  • Jenkins CI server installed and configured on Windows

  • Git as the source control system

  • Java as the main programming language of build projects

  • Maven as the build tool

  • Findbugs, PMD, and Checkstyle as the static code analysis tools

  • Tomcat as the deployment server

  • Setup Jenkins in AWS using Lightsail

  • Use EC2 Plugin for Auto-scaling

This set of tools provides a comprehensive, end-to-end implementation continuous deployment pipeline. Jenkins can be installed on many operating systems and supports a myriad of tools and technologies -- which means, this course provides tremendous value to those comfortable or interested in other operating systems and/or technologies.

Course Outline

Introduction provides an overview for the course, which leas to the Core Concepts for Jenkins. This provides a foundation for the remainder of the course.

Installation provides step-by-step instructions on how to setup Jenkins and all the related tools specifically on Windows. The same principles are applicable to other operating systems as well.

The Basics provides a first look at Jenkins at work with a very simple "freestyle" project. This allows us to learn the Jenkins interface and the key features it provides.

After that, we dive into Maven Projects specifically -- since Jenkins natively understand Maven and thus provides special features for Maven projects.

Jenkins can do so much more than simply building. In Test & Quality, we hook up a standard set of unit testing and quality analysis tools for Java projects. Then, we use that information to affect the build status based on established standards.

We also cover how to use Jenkins as an artifact repository which is used to store the build artifacts, like jars and wars, after successful builds. This is particularly useful when integrating Jenkins with other tools in a more comprehensive software delivery strategy.

Then, we bring everything together for Deployment to a running Tomcat server. Don't worry, I'll walk you through the complete setup and configuration to work seamlessly with Jenkins!

Finally, no course would be complete without talking about Security. In this final chapter, we setup Jenkins to allow users to login and only see their projects.

Course Features



Presentations provide audio/video training of conceptual ideas in each major area or introduction of new concepts.

Screencasts provide a video of the instructor's computer system with any actions, commands, or screens displayed and narrated. There are several hours of screencat video content -- it makes up the vast majority of the course. Any command line based screencast will include a command listing in the lecture downloads.

Who this course is for:

  • Developers, software engineers, and programmers wanting to avoid "it works on my machine" syndrome
  • IT professions looking to implement continuous inspection through continuous deployment at their company
  • IT management that wants to have a deeper understanding of Jenkins and other DevOps concepts
  • DevOps (Development/Operations) professional looking at Jenkins as a build tool or as part of a larger software delivery pipeline

Course content

14 sections • 111 lectures

Welcome: Course Objectives and Overview Preview 02:46

An overview of the goals in this course, including understanding key concepts, creating end-to-end automation, and mastering the Jenkins essentials.

Course Focus and Approach Preview 02:30

A quick summary of the focus of this course as well as the approach taken. This course focuses on step by step hands on examples, backed up with a minimal amount of slides to help teach needed theory.

Build Maturity Preview 03:10

A description of the states of build maturity, including Minimal build process, continuous inspection, and finally continuous integration.

What is Jenkins? Preview 03:54

A quick summary of how the Jenkins system works by running on Jetty on a host system, and how on a more macro scale Jenkins is basically an executor of plugins.

About the Instructor Preview 04:13

A quick background on the instructor, Jason Taylor, and a dive into his experience as the build guy throughout his professional career.

Overview Preview 02:57

An overview of the different computing platforms that will be used and what software will be installed on each, including Chrome, Git, Atom, Java, Maven, and Jenkins.

Windows Installation Preview 10:09

A quick overview of what tools will need to be installed, including the web browser Chrome, the source control tool Git for Windows, the text editor Atom, the programming language Java (JDK), the build tool Maven, and the build tool Jenkins.

Mac Installaiton Preview 09:35

A quick overview of what tools will need to be installed, including the web browser Chrome, the source control tool Git from Apple, the text editor Atom, the programming language Java (JDK), the build tool Maven, and the build tool Jenkins.

LInux Installation Preview 10:26

A quick overview of what tools will need to be installed, including the web browser Chrome, the source control tool Git from apt-get, the text editor Atom, the programming language Java (JDK), the build tool Maven, and the build tool Jenkins.

The Basics Overview Preview 00:57

An overview of what basics will be covered in this section, including creating our first jobs, working with that job, managing Jenkins, managing plugins, changing configuration settings, and setting up the build languages Jenkins will use.

The First Job Preview 05:09

Creating our first job in our newly installed Jenkins installation, adding a build step to echo a basic command back to us, and then finally running the build and viewing the results.

Jenkins Dashboard Preview 03:05

Exploring the Jenkins interface on the main level to show how Jenkins handles our newly created job.

Failing Jobs Preview 04:02

Making our job intentionally fail in order to give an excuse to disable and then re enable the job.

Copy and Rename Jobs Preview 05:56

Renaming our job, including making sure we have a separate name for the project URL to make the URL web friendly. Afterwards creating copies of our job to have multiple jobs to work with for future lessons.

Update Plugins Preview 08:09

Researching, installing and updating plugins in our Jenkins installation, including an instillation of a purposefully out of date plug in.

Delete a Job Preview 02:37

Deleting specific builds within a project, as well as deleting an entire project when it is no longer needed.

Manage Jenkins Preview 04:37

Looking at a few items in the manage Jenkins section of Jenkins, including a few sections we will cover in greater detail in upcoming lectures.

Jenkins Configuration Preview 05:15

Setting up the basic configuration in Jenkins, such as the number of executors, system message, and attaching all of the tools we will use in this course.

Maven Projects Overview Preview 01:14

An overview of the process for this section, including validating our project outside of Jenkins, creating a Maven based Jenkins project, reviewing build results, integrating Maven deeper with Jenkins, and creating a workspace for Maven projects.

Confirm Maven Project Outside Jenkins Preview 04:46

Compiling our project from GitHub on our local system first in order to ensure that it is working.

Maven Freestyle Preview 07:52

Setting up a freestyle job to use the command line Maven tool in order to build our project by specifying the goals.

Jenkins Workspace Preview 02:48

Taking a look at the workspace that accompanies the Jenkins project, which contains the entire Maven project.

Maven Jobs Preview 05:35

Installing the Maven Integration plugin into Jenkins in order to build our Maven project with more features.

Maven Build Modules Preview 02:34

Taking a look at the specific features provided by the Maven integration plugin, namely how it allows us to see build results for the individual Maven Modules.

Failed Maven Projects Preview 02:50

Intentionally failing our Maven project to show what a failure looks like with the Maven project type.

Scheduling Jenkins Jobs Preview 03:12

Automating builds by building our project every so often on a set schedule using the cron-like scheduling format used in Jenkins.

Source Control Polling in Jenkins Preview 03:13

Using the cron-like format in order to periodically poll changes from our source code management to only build only when changes are detected on our GitHub repository.

Jenkins Tabs Preview 02:54

Looking at Jenkins views, which are tabs on the Jenkins homepage that allow us to sort our projects into groups.

Jenkins Home Directory Preview 02:40

Looking at our local files of our Jenkins build system, including the location within our build system where our Jobs and their workspaces are stored.

Upgrading Jenkins Preview 04:58

Taking a few moments to review the patch notes for Jenkins before using the Windows automatic upgrade system within Jenkins itself. Afterwards is an explanation of how to upgrade Jenkins on Mac and Linux.

Continuous Inspection Overview Preview 00:55

An overview of what will be covered in this section, such as Java-focused code quality analysis tools, plugins to help with quality analysis, building and reviewing our quality analysis, and enforcing code quality by failing builds falling behind a threshold.

Project Source Review (Unit Tests and updates for quality analysis) Preview 07:44

Reviewing the source code for our time tracker project on GitHub in order to understand better how the unit test dependencies work, where the unit test Java code is located, and how the project itself fits into all of this.

Quality Analysis Plugins and Configuration Preview 04:06

Installing the quality analysis plugins we will need to do unit testing, including Junit, PMD, FindBugs, and Checkstyle, configuring them to work in our project by adding their goals to the Maven project.

Build and Review Preview 02:52

Building our time tracker project with the quality metric plugins enabled so that we can look at how Jenkins records the build trends.

Unit Testing in Jenkins Preview 05:37

Reviewing the Unit test results for our time tracker project within the terminal output as well as within the individual modules for our Maven build. Also will causing a test to fail in order to observe what that does to our results trend.

Reviewing Quality Analysis Preview 06:45

Reviewing the code quality reports to view where specific code quality issues come up in our build, such that we will be able to fix them in later lessons.

Enforcing Minimum Quality Scores Preview 07:17

Using thresholds from the static analysis collector plugin in order to either make our build fail or become unstable based upon the unit test results we have run on the build.

Improving Quality Scores Preview 05:09

Making changes to our project source code in order to improve our quality metrics to hopefully bump our project from the failing threshold to the unstable threshold.

Publishing Overview Preview 01:07

An overview of the ways we will create a Jenkins artifact repository in this section, which is not a long term solution to publishing build artifacts but rather a simple one we can do within Jenkins.

Maven Repository Plugin and Configuration Preview 02:38

Installing the Maven Repository Server plugin in order to prepare our repository to be able to create a Maven repository artifact.

Build and Review Artifact Publishing Preview 05:48

Building our application with the Maven repository server plugin enabled, reviewing the results of the published artifact directory structure.

Deployment Overview Preview 01:30

An overview of the artifact topics covered in this section, namely installing and configuring Tomcat before using Jenkins to deploy to Tomcat.

Tomcat Installation Preview 07:23

A guide to fully installing and configuring the Java tool Apache Tomcat onto our local system in order to then deploy our Maven build artifacts to. It also covers how to start and stop the service and login to our Tomcat server.

Deployment Plugin Preview 04:51

A guide to installing the Deploy plugin needed to send the build artifacts to the Tomcat web application server, then configuring our Time Tracker project to use that plugin to deploy the generated WAR file to that server.

Deployment Preview 03:41

Deploying our web application to Tomcat using the Deploy to container plugin in Jenkins, before making a few changes and seeing if Jenkins can re-deploy with the new changes.

Security Overview Preview 01:29

An overview of the security topics that will be covered, including manually disabling security, re-enabling basic security, using matrix-based security, and using role based security.

Manually Disable Security Preview 03:01

Editing the Jenkins configuration file as a last resort if you manage to lock yourself out of your Jenkins installation and just have to get back in.

Enable Security and Login Preview 04:26

Enabling security within Jenkins by going to configure global security under our Jenkins management tools. This will also allow us to set up some basic security features, such as restricting non-logged in users from building or editing projects.

Adding Users in Matrix-Based Security Preview 08:29

Setting up matrix-based security in order to offer finer permissions for each individual logged in user, as well as users who aren't logged in, and a special admin user account. This includes permissions that vary on a project by project basis.

Users Role Preview 06:29

Changing our security to role-based using the role-based authorization strategy plugin. This will allow us to group users together in roles before assigning them permissions all at once.

Project Role Preview 05:16

Using the previously installed role-based security plugin in order to specify more fine grain access to individual projects. We will use a regular expression to automatically add a user to a project when it has certain text as a prefix.

Jenkins Production Using Lightsail Overview Preview 05:20

An overview of the topics that will be covered in this section on AWS lightsail for Jenkins Production, with an explanation of what creating a production style environment for Jenkins can do.

AWS Signup Preview 02:40

Creating a new AWS account and signing into it, making sure to fill out the payment information as it will be required to follow along.

Course Repository Preview 03:48

Reviewing the scripts and files we will use in this section to automate the setup of our Jenkins installation on our remote AWS server.

Jenkins Instance Preview 08:34

Using the configuration and script files we just reviewed to spin up a Jenkins server on our AWS Lightsail remote server.

Static IP Address and DNS Preview 08:29

Setting up a static IP address for our Lightsail installation and then associating it with a domain name record, forcing the association on our local system before the global DNS record updates to include it. You must own a domain name in order to fully complete this section.

Instance Access Preview 05:16

Accessing our instance on AWS lightsail using the ssh command on our terminal and the static IP address we just associated with our instance.

Jenkins Setup Preview 05:45

Accessing Jenkins on our remote AWS installation and walking through the setup wizard to be able to start using Jenkins.

Restart within Lightsail Preview 04:10

Starting, stopping, and restarting our Jenkins instance on our AWS lightsail installation using the lightsail interface.

Instance Snapshots Preview 02:28

Using an instance snapshot to back up all of the information on our Jenkins server. This backup is a complete copy of the hard drive, but any further snapshots only store the changes between snapshots.

Instance Flip Preview 10:52

Creating a new Jenkins server instance from our backup snapshot, then performing a system upgrade on that Lightsail server, before finally switching our static IP address to our new server. This is a common production pattern called zero downtime deployment.

Clean Up Preview 02:17

Cleaning up our Lightsail workspace by deleting our unwanted servers and snapshots, saving money in the process!

Update HostKey Preview 02:14

Updating the ssh fingerprint of our new Jenkins server instance in order to allow login via ssh on the terminal.

Web Secured, Part 1 Preview 12:14

Beginning the process of encrypting traffic to our web server by enabling SSL security. This video contains theory about SSL, as well as the process of setting up our new Lightsail server instance with the necessary startup shell script.

Web Secured, Part 2 Preview 06:29

Actually enabling SSL on our Lightsail server by using the command line to log into our Lightsail server.

Update Jenkins Preview 06:15

Updating the core Jenkins server as well as several plugins we have installed onto it on Lightsail. This is done on the command line by logging into our instance using ssh.

Beyond Lightsail Preview 04:11

A description of how to grow beyond what we have done with Lightsail in this section, including VPC peering, getting a larger instance, setting up automation tasks, scheduling snapshot backups, and security hardening.

Scaling Jenkins in AWS Lightsail Overview Preview 08:34

Bigger is Better Preview 09:33

Bigger Project Preview 02:17

Scale Up Design Preview 03:49

Web Proxy Server, Part 1 Preview 06:25

Web Proxy Server, Part 2 Preview 09:40

Securing with SSL Preview 06:49

Jenkins Master Instance Preview 07:04

Web Proxy Connection Preview 06:54

Jenkins Setup Preview 04:03

Build Node Instances, Part 1 Preview 10:21

Build Node Instances, Part 2 Preview 10:17

Jenkins Plugins Preview 03:02

Jenkins Global Tools Preview 05:50

Add Credentials Preview 03:30

Attach Build Nodes Preview 08:09

Update Build Nodes Preview 03:22

Host Verify Preview 04:16

Project Labels Preview 05:08

Matrix Project Preview 03:37

Maven Project, Revisited Preview 04:29

Build Node Reduction Preview 04:52

More Clean Up Preview 07:05

Restore Part 1 Preview 07:01

Restore Part 2 Preview 10:44

Jenkins Incompatibility with Java 9, 10 and 11 Preview 01:37

Known Issue: Maven Projects Fail with POM Parse Error Preview 02:28

Maven Repository Server plugin causes Build Failure Preview 02:36

Resolve Problem with MacOS Upgrade Breaking Git (new!) Preview 05:07

A guide to resolving the issue of Git not working after upgrading to a new version of Mac OS.

Final Thoughts Preview 01:39

A final overview of what we have learned and tips on what to do next.

32 vs 64-bit Windows Preview 00:41

Determining whether the platform you are on is 64 or 32 bit to ensure  you install the correct version of software for your system.

Google Chrome on Windows Preview 03:33

Installation of the web browser Google Chrome on our local Windows system.

Git for Windows Preview 06:10

Installing the versioning software Git for Windows onto our local Windows System.

Git Configuration Preview 01:59

Setting up the minimal configuration needed by Git to get our Git for Windows setup working.

Atom Installation on Windows Preview 02:24

Installing the text editor Atom onto our local Windows system.

Atom Configuration Preview 06:01

Configuring the Atom text editor to work better for all the lectures in this course.

Java Installation on Windows Preview 03:12

Installing the software development tool, the Java JDK, onto our local Windows System.

Java Configuration Preview 02:54

Configuring our local system to have a virtual link to our Java installation through the Java_home variable.

Maven Installation on Windows Preview 04:40

Installing the software development tool Maven onto our local Windows system.

Jenkins Installation on Windows Preview 01:38

Installation of the build management tool Jenkins to our local Windows system.

Jenkins Getting Started Preview 01:49

Getting started setting up the basic functionality of Jenkins, creating our initial login.

Starting and Stopping Jenkins via Windows Services Preview 03:04

Using our windows services to start and stop Jenkins on our local system.

Installation Notes for Windows 10 (Updated) Preview 05:47

Bonus: Exclusive Student Discounts Preview 04:49