Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
March 31, 2022 02:51 pm GMT

Setting up Continuous Integration With Git and Jenkins

In this post, I'll show you how to use git and Jenkins to set up a continuous integration system for a Github repository.

Ascertaining that all of your installation procedures have been completed.

Step 1

Once Jenkins has been successfully started, we can check to see if the local Jenkins server is running on the machine by going to the following URL in your browser http://localhost:8080/ .

Step 2

  • Go to your Githubpage and navigate to "Settings".

  • Click on the "Developer settings" menu and then on Personal access tokens in the settings screen.

  • On the "Personal access tokens" tab, click the "Generate new token" button, enter the necessary information, and then click the "Generate token" button.

Step 3

Navigate to 'Manage Jenkins' and then to 'Manage Plugins' in Jenkins Dashboard.

Jenkins Git Plugins

Make sure all these git plugins are installed properly.

Step 4

Select the New Item option in Jenkins Dashboard. Enter a name for the item and select Freestyle project. When you press OK, you will be taken to the configuration page.

Step 5

In General tab click on Github project and enter your github project url.

Github

Step 6

You must now specify the git url of your specified github project in Source Code Management.And in the Credentials field, enter your github's person access token.

Note : Private repositories require an Access token, whereas public repositories do not.

GIT

Step 7

Now, in Build triggers, let's specify our trigger so that Jenkins will run a job for each github commit.Select Poll SCM and schedule the time span according to your wish by refering CRON Jobs.

Poll SCM

Step 8 [Optional]

In Build Environment tab lets execute shell commands.

Build environment

Once your configuration is over click on Save button.

After each commit on your github repository, your build will now be triggered automatically.

build log

console output

I hope you find this information useful!


Original Link: https://dev.to/ndrohith09/setting-up-continuous-integration-with-git-and-jenkins-4nk4

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To