jenkins Getting started with jenkins Configure a project in Jenkins


Example

Here we will be checking out the latest copy of our project's code, run the tests and will make the application live.To achieve that, follow below steps:

  1. Open Jenkins in browser.
  2. Click the New Job link.
  3. Enter project name and select the Build a free-style software project link.
  4. Click on Ok button.
  5. Under the Source code management section, select the radio box next to your source code management tool. In my case I have selected Git.

Provide url of git repo like git://github.com/example/example.git

  1. Under the Build triggers, select the radio box next to Poll SCM.
  2. Provide ***** in Schedule box. This box is responsible to trigger the build at regular intervals. ***** specifies that, the job will get trigger every minute for changes in git repo.
  3. Under the Build section, click the Add Build Step button and then select the option by which you want to build the project. I have selected Execute Shell. In the command box write the command to build,run the tests, and deploy it to prod.
  4. Scroll down and Save.

So above we have configured a basic project in Jenkins which will trigger the build at every minute for change in your git repository. Note: To setup the complex project, you may have to install some plugins in Jenkins.