The course is part of these learning paths
This course introduces you to Jenkins, a popular open-source tool used to perform Continuous Integration and Continuous Delivery.
We review the key Jenkins features and associated terminology. We then take you through a deep dive in configuring Jenkins to perform automated builds using the Jenkins web administration console in hands-on demonstrations, familiarising you with Jenkins and how to administer it. We’ll demonstrate features such as:
- Installing and setting up Jenkins
- Creating and configuring pipelines manually
- Creating and configuring pipelines using a Jenkinsfile
- Triggering build pipelines, manually and automatically
- Navigating downstream and upstream build projects
- Connecting to version control repositories such as GitHub
- Setting up build pipelines for Java-based projects using Gradle
- Recording artifacts and test results
What you'll learn:
- The basic principles of build automation as implemented within Jenkins and how they should be applied to manage and maintain building, testing, and deploying your own enterprise software projects
- How to install, set up, and configure Jenkins pipelines
- The key differences between Jenkins declarative and scripted pipelines
- How to manage build artifacts and test results
- How to integrate and leverage third-party build tools like Gradle, Maven, Yarn, Webpack, and many more within a Jenkins pipeline
This training course provides many hands-on demonstrations where you will observe first hand how to use Jenkins to build and release different types of software projects, for example:
- Building a back-end application developed using Java, Gradle, and Docker, requiring Jenkins to compile the source code, packaging it into a WebArchive file, and then finally releasing it into a Tomcat-based Docker image complete with Splunk-based instrumentation for logging and monitoring
- A basic understanding of CICD, or Continuous Integration and Continuous Delivery
- A basic understanding of software development and the software development life cycle
- A basic understanding of version control and associated workflows
- Software Build and Release Engineers
- Software Developers
- DevOps Practitioners
The following GitHub repo contains sample Jenkins configurations used within the provided demonstrations:
The following supporting Jenkins documentation is available online:
- [Instructor] Okay, welcome back! In this demonstration, I'm going to walk you through the process of connecting downstream and upstream build projects together.
So what examples are there that might motivate us to do this? Well, consider a build project where you're building Library One, and then you also have a second library called Library Two. Now, Library Two has a dependency on Library One. Now, if you've rebuilt Library One, then the requirement would be that Library Two needs to be rebuilt to take into account any modifications made in Library One. And so this is a good example of connecting build projects together. So we'll jump into this.
So, let's log back in. Recalling from our previous demonstration, we select BuildJob1. So what we'll do now is we'll click on New Item, and we'll create BuildJob2. It will also be a freestyle project, and we click on OK. We'll click on the Build tab, and again, we'll add a simple shell script for the build job. So here we'll simply echo out BuildJob2. We'll click Apply, and Save. We'll click the Build Now, just to make sure there that executes successfully, which it has, we click on build job number one, look at the console output and, as expected, we have a success for it.
Okay, so let's go back to the Jenkins homepage. So we have BuildJob1 and BuildJob2. Now what we wanna do is configure BuildJob1 to trigger BuildJob2 anytime that it executes successfully. So here we select Post-build Actions, and we'll click on the add post-build action drop-down. This time we'll select build other projects, and we'll enter the project name that we want to build, which will be BuildJob2. We'll trigger BuildJob2 only if this current BuildJob1 is stable. Notice that we can do multiple projects as well, but for now we'll stick with just BuildJob2. We'll click Apply, and we'll click Save.
Now, we'll store within BuildJob1, and what we'll do now is we'll click the Build Now link. Okay, build number eight has successfully completed, and if we go back to the dashboard, if we go into BuildJob2, you'll notice now that a second build job has also been executed for it. And this is a result of BuildJob1 running and completing successfully. If we go back to the dashboard, and on BuildJob1, we trigger another build, we go back into BuildJob2, again, you see a third build is being executed. Now, within each build job, we can see the upstream or downstream projects. In the case of BuildJob2, it has an upstream project called BuildJob1. Clicking on BuildJob1, you can see that it has a downstream project, which is BuildJob2.
So in summary, this demonstrates how you can chain together build jobs. And depending on where in the chain the particular build job is, it will either be considered a downstream build project or an upstream build project.
Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.
He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 25+ years. In recent times, Jeremy has been focused on DevOps, Cloud (AWS, Azure, GCP), Security, Kubernetes, and Machine Learning.
Jeremy holds professional certifications for AWS, Azure, GCP, Terraform, Kubernetes (CKA, CKAD, CKS).