From the course: Intermediate Jenkins: Automate, Integrate, and Secure CI/CD Workflows at Scale

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Connect Jenkins to GitHub

Connect Jenkins to GitHub

Now that we've seen the benefit of using a Jenkins file from a source control system, let's connect Jenkins to a GitHub repository, and then use a change in the repo to trigger a build in Jenkins. If you're following along with this demonstration, you'll need to have an internet-accessible Jenkins server and a GitHub account. I've created a new repository for this demo, and I've added the exercise files for this lesson. The Jenkins file contains the configuration for this project. Now I'll set up a pipeline job on my Jenkins server to use this configuration. First I'll copy the repository URL. On the home page of the repo I'll select Code, then HTTPS, and then the copy icon. For my Jenkins server home page I'll create a new pipeline project. I'll select New Item, and I'll enter the name for this project. I'll use the same name as the repo just to keep things coordinated. Then I'll select Pipeline and OK. I'll select Triggers to get to the Build Trigger section. In this part of the…

Contents