The course is part of this learning path
This training course introduces you to Jenkins, a popular open source tool used to perform Continuous Integration and Continuous Delivery.
We spend time early on reviewing 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, ensuring that you become familiarised 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
- Configuring Jenkins pipelines using the Blue Ocean interface
- Defining build execution environments using docker containers
- 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
- Setting up and scaling out Jenkins with multiple build agents and executors using SSH
What you'll learn:
- The basic principles of build automation as implemented within Jenkins and how should be a applied to manage and maintain building, testing, and deploying your own enterprise software projects
- How to install, setup, and configure Jenkins pipelines
- The key differences between Jenkins declarative and scripted pipelines
- How to manage build artifacts and test results
- How to scale out Jenkins using Master and Build Agent setups using SSH
- The benefits of codifying pipeline build instructions using a Jenkinsfile
- How to leverage Docker containers within a Jenkins pipeline to provide additional build isolation and flexibility
- How to install and use the newer more modern pipeline centric BlueOcean user interface
- How to integrate and leverage 3rd 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
- [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.
About the Author
Jeremy is the DevOps Content Lead at Cloud Academy where he specializes in developing technical training documentation for DevOps.
He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 20+ years. In recent times, Jeremy has been focused on DevOps, Cloud, Security, and Machine Learning.
Jeremy holds professional certifications for both the AWS and GCP cloud platforms.