This lesson starts you on the path to creating jobs in Jenkins. Learn the different types of jobs that are available and the reasons why you might want to choose one type over the other.
- [Instructor] If you're running a default installation, when you click new item from the homepage you'll see a list of items similar to this one with several types of items you can create. For now let's discuss the type of jobs available to you. And also, I should mention, you'll see job and project used interchangeably as you work with Jenkins, but they are essentially the same thing. The type of job that is most commonly used is the freestyle job. As the name implies, the freestyle job lets you freely control the way Jenkins manages the tasks you want to automate.
Pipeline jobs are useful for jobs that require a series of steps to produce a final outcome. Imagine the series of tasks that are needed to build an application. You might need to check out code, run some tests, compile the code, and then deploy the application. Pipeline jobs are well suited for defining and managing these tasks. The multiconfiguration project is useful when you might have multiple jobs that do the same thing but for different combinations of parameters. Instead of duplicating steps by creating a single job for each set of parameters, you can use the multi-configuration project to create a single job that applies the parameters for you.
The GitHub organization and multibranch pipeline jobs are specifically suited for working with code repositories. GitHub organization jobs are configured to scan GitHub repositories for specific types of files that Jenkins then uses to configure the build automatically. Similarly, the multibranch pipeline job can be used to configure jobs for different branches in a single repo. The next item, folders, isn't really a job. Jenkins uses folders to group things together. We'll talk more about folders in an upcoming lesson.
For the remainder of the course, though, we'll be focusing on the freestyle job. It's the most commonly used job type, because it gives you the most flexibility in telling Jenkins what to do.
First, learn how to set up Jenkins on Mac, Windows, Linux, or inside a Docker container, and find out how Jenkins plugins are used to extend its functionality. Next, configure your first job step by step, leading up to the requisite "Hello, World" output, and learn to make your jobs more useful and portable with parameters. Then explore job scheduling, and Jenkins's convenient aliases for running jobs at regular intervals. The course wraps up with tips for organizing jobs in folders and views and a brief look into pipelines as code-which enable you to execute a series of jobs in stages.
By the end of the training, you should be able to install Jenkins locally or on a virtual machine, create a Jenkins jobs that can be triggered manually or on a schedule, and install and configure plugins to extend the Jenkins framework.
- Installing Jenkins
- Using plugins
- Creating and configuring a job
- Running and monitoring jobs
- Managing artifacts
- Working with parameters
- Scheduling jobs
- Organizing jobs with views and folders
- Defining stages with pipelines