Best crash course to learn Jenkins from scratch

Learn Jenkins from scratch

Jenkins CI is the industry’s most popular, open-source tool for building continuous integration and continuous delivery (CI/CD) pipelines.

Any DevOps professional who wants to contribute meaningfully to their team needs to know the fundamentals of this powerful software deployment automation tool. That’s exactly what this Jenkins tutorial and crash course is designed to do.

Top 10 Jenkins crash course topics

Jenkins is a comprehensive and exhaustive DevOps tool. There’s a multitude of SaaS products, software and technologies Jenkins can integrate with.

Ten of the most important topics covered in this Jenkins course include:

  1. Install Jenkins along with the appropriate JDK version.
  2. Create standalone and integrated Jenkins build jobs.
  3. Create both basic and complex Jenkins pipelines.
  4. Configure build parameters and access environment variables.
  5. Install Jenkins plugins to access third-party functionality.
  6. Perform static code analysis during a build job
  7. Integrate with GitHub, Maven, Gradle, Git and other tools.
  8. Troubleshoot failed Jenkins build jobs
  9. Create Docker images with Jenkins.
  10. Fully deploy a Spring Boot microservice into the cloud.

Advanced Jenkins tutorial

While this Jenkins tutorial for beginners doesn’t miss a step between a basic install and the creation of complex pipelines, expert users will enjoy advanced aspects of this Jenkins tutorial as well, such as the following:

  • Configure Jenkins credentials to authenticate against external tools and services.
  • Build a cloud-native Spring Boot application in Jenkins.
  • Package a microservice in an executable JAR file.
  • Invoke standard build jobs from scripted pipelines.
  • Understand when to use shared Jenkins libraries in declarative pipelines.

As you can see, the promise is to teach someone Jenkins from scratch, upon course completion, the learner will quickly become competent with this powerful CI/CD and build automation tool.

Jenkins download and install

To learn Jenkins, you must first install Jenkins.

The only Jenkins prerequisite is the installation of Java 11 or newer. Installation of Java 17 is recommended.

As of September 2023, support for Java 21 is not yet available, although it will be soon.

Jenkins installer

To install Jenkins on Windows, you can either use the .msi installer or run it as an executable JAR file.

The benefit of the .msi install is that this configures Jenkins as a service that runs at startup.

Jenkins pipelines and build jobs

After a developer installs Jenkins, the next step is to run a basic Hello World Jenkins build job. A single build step in a freestyle project is all that’s needed.

This Jenkins tutorial also builds a Hello World Jenkins pipeline immediately after the build job is created.

Jenkins Tutorial for beginners

The first task in this Jenkins tutorial, after installation, is to create a basic Jenkins build job.

Importance of Jenkins pipelines

Many tutorials delay the introduction of the Groovy- or Kotlin-based Jenkins pipeline, and instead concentrate on the GUI tools used to create standard build jobs. This Jenkins course does not make that mistake.

This tutorial gives equal treatment to pipelines and build jobs. It also examines advanced Jenkins pipeline features toward the end.

Jenkins environment variables and parameters

Two features commonly used when a developer creates a Jenkins build job are:

  1. Jenkins environment variables.
  2. Parameterization at startup.

This Jenkins course demonstrates both of these concepts, first by creating a parameterized build job, and then a pipeline that access environment variables in the Groovy code.

These exercises strengthen the important skills of DevOps engineers who work with Jenkins every day.

Jenkins Environment Variables

How to use environment variables in a Jenkins pipeline is an important skill every DevOps engineer must have.

Jenkins, GitHub, Maven and Gradle

With a strong knowledge of how Jenkins works, the next step is to integrate Jenkins with third-party tools such as the following:

  • Git and GitHub for version control.
  • Apache Maven for dependency management.
  • Gradle for build and compile operations.

The creation of a continuous integration pipeline that accesses a GitHub repo, builds and compiles the code with Maven and then packages the successfully saved binaries into a JAR file demonstrates strong Jenkins skills and knowledge.

Jenkins plugins

Jenkins’ popularity is due in large part to its plugin architecture. Any vendor can make a Jenkins plugin that can be freely downloaded from a cloud-based marketplace.

This means DevOps engineers can complement simple Jenkins build jobs with advanced tools that perform important operational tasks. These include:

  • Static code analysis.
  • Performance management.
  • Penetration testing.
  • Load testing.
  • Sending team notifications.
  • Stress testing.

In the world of DevOps, the goal is always to shift left and embed operational tasks in the development phase.

For many teams that engage in a DevOps transition, the inclusion of Jenkins plugins in their builds is the first step in a gradual operational shift left.

Advanced Jenkins pipelines

The course finishes off with the development of a highly advanced Jenkins pipeline that performs the following functions:

  • Pulls a Spring Boot microservice from GitHub.
  • Compiles and tests operations on the application.
  • Packages the microservice in an executable JAR file.
  • Builds a Docker image for deployment.
  • Uses credentials to authenticate over https.
  • Deploys the microservice into the cloud through DockerHub.

A complete Jenkins course

From start to finish, this Jenkins tutorial for beginners will quickly turn novices into experts.

Continuous integration and deployment has never been so easy.

App Architecture
Software Quality
Cloud Computing
Security
SearchAWS
Close