Creating the Jenkins job to automatically run the builds

As mentioned before, Jenkins has a plugin to help with the GitHub integration. We can easily take advantage of it by creating a GitHub organization job. To do so, go through the following steps:

  1. Open your Jenkins home page in your browser and click on create new jobs.
  2. Below Enter an Item name, give it your GitHub username or (organization name), click on Github Organization, and then OK.
  3. This will bring you to a new page where we will be able to configure the project and where we will configure the Projects section:
    1. In the credentials drop-down menu, select your newly created credential.
    2. Validate that the owner is your username or organization name. This will be used by Jenkins to scan your all your repositories.
    3. Since we already know we are only interested only in the one called helloworld, Click on the Add button a the bottom of the Behaviors section and select the first option which should be Filter by Name (with regular expression).
    1. In the newly populated field, Regular expression, replace .* with helloworld.
    2. Click on Save.

The job will be created and will scan the project to find any branch. It will find the master branch with the README file in it, but because we don't have any code yet we will not do anything. In the following section, we are going to remediate to that lack of code and implement our Hello World application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset