Developing software involves many processes to get code from development into a production environment. Jenkins 2 introduces a new pipeline approach to help you automate every step of this process. In this course, Getting Started with Jenkins 2, you'll learn how to set up application builds to compile, test, and package your apps. You'll see how to kick off this process every time someone checks in and get notifications when something fails. You'll see how to get high-level reporting about failures and how to install additional plugins to extend Jenkins. At the end, you will see how to automate the deployment of software including the ability to add manual approvals. By the time you're done with this course, you'll have everything you need to automate taking your software from development through to production with Jenkins 2.
Wes Higbee is passionate about helping companies achieve remarkable results with technology and software. He’s had extensive experience developing software and working with teams to improve how software is developed to meet business objectives. Wes launched Full City Tech to leverage his expertise to help companies delight customers.
Course Overview Hello and welcome to my course, Getting Started with Jenkins 2. My name is Wes Higbee. I am a huge fan of having automation to take software from development through to a production environment. There is nothing as cool as being able to check in code and see it flow automatically through to at least some staging environments and maybe even into production and having all the sanity checks along the way to make sure that everything is okay, this really makes me feel confident about the software that I'm creating and the software that I'm helping my customers create. No matter where you're at right now, this course will help you get up and running to quickly automate builds, deployments, testing, and many other things with Jenkins 2 and one of the major things we'll be covering is the new pipeline functionality that's built in right out of the box. By the end of this course, you'll know how to set everything up so that when a developer checks in code, that code can be compiled, tested, packaged, and then deployed to staging environments, perhaps further testing, and even the ability to deploy that into production environments. I've designed this course for anybody that has an interest in or perhaps even a background in automating builds and deployments of software, so no matter where you're at, whether you've used Jenkins in the past or you're completely new to it, this course will help you get up and running quickly. If this sounds like what you're looking for, join me as I take you through Getting Started with Jenkins 2.
Creating Application Builds Now that we have Jenkins up and running, let's put it to use to build some application code. Before we dive into this demo, let's first walk through the anatomy of a build process. First we're going to clone our application source code from GitHub. We'll clone that into a local workspace, a folder that we create on our hard drive. Once we have that code, then we'll compile it to make sure that it compiles. We'll run unit tests on it to make sure it's healthy code, and then we'll package up the result and in this case we'll produce a JAR file. This is the process we're going to work with, first manually so we can see the commands that are involved and then we'll port those manual commands over to automation inside of Jenkins. So let's get started by cloning our code from GitHub.
Testing and Continuous Integration We now have a process in place inside of Jenkins that allows us to, at the push of a button, take our application source code, clone it into a workspace, compile it, test it, and package it up. We can capture the package artifacts and keep a history of those, and if something goes wrong along the way, we can find out about it, dig into the problem, and fix it pretty quickly; however, this is just the beginning of what we might like to have. If you are like me at all, you're probably not going to remember to come out here to Jenkins every day or every time you update your software and commit in version control. You're probably not going to remember to come out here and run the build and then wait for the output, especially if your build process takes some time. So in this module we're going to look at rounding out our build process to flush it out into a continuous integration process, a process we can use to quickly get feedback about problems in an automated fashion. So we'll set up triggers to execute our jobs automatically. We'll set up notifications so we can find out about problems, and we'll also see how we can expand out the reporting here to get some high-level overviews of testing because right now, while we we're running the tests, the only place we can go to the test results is in side of the Console Output. It would be nice to be able to get the test results parsed on a high level to give us some additional information so we'll see that as well, as well as talking about some other static analysis tools that we might like to plug into the process.
Finding and Managing Plugins Back when we installed Jenkins we chose the option to install the suggested plugins and then after this screen we were presented with a screen showing us the progress of downloading and installing each of those plugins and that was a great way to get up and running with some default plugins that we'd probably like to have but we also could have chosen to select the plugins that we'd like to install by default. The suggested plugins would still be selected and then we could scroll here, uncheck some, add some, and then continue with the installation process. One of the things that I like about Jenkins 2 is that out of the box it comes with many more suggested plugins that provide the ability not to need to install anything right away for some common scenarios; however, at some point you'll want to install plugins, so that's what we'll look at in this module. Now we won't be coming back to the installer to do that, instead we'll be taking a look at how we can manage plugins within our existing Jenkins installation.