In this blog, we will learn, how we can
integrate our Git Repository with Jenkins to continuous poll it for any modification
and execute automation script in case of any changes.
1)
Log in into Jenkins-->Manage Jenkins
and Install Git Plugin. Please make sure to restart Jenkins after the plugin
installation.
2)
Now go to Jenkins Home Page create New Jenkins
Job and in Info Maven plugin Configuration under GitHub Project, Provide the path
of GitHub Project.
3) Under Source Code Management Section Select Git and again provide the path of the GitHub Project.
Sometimes
we may get an error message when we enter the repository path.
This
usually happens if Git is not installed on the local machine. To Install Git, go to https://git-scm.com/downloads
4)
Under Build Triggers, Select Poll SCM
and provide the polling frequency as per your requirement.
5)
Apply and Save Changes. Now after any
changes made to Git Repository or as per polling frequency given Jenkins will
automatically execute automation suite.