Running Continuous Integration/Continuous Deployment (CI/CD) using Jenkins

To run CI/CD using Jenkins, perform the following steps:

    Procedure
  1. On the Jenkins Dashboard, go to Manage Jenkins > Manage plugins > Available and download the following plug-ins:
    • Maven Integration
    • Git Plug-in
  2. On the Jenkins Dashboard, click New Item and add a name for the Maven Project, for example BWSampleProject. Then click OK.
  3. On the Configure page, set the following attributes:
    1. On the General tab, add a description for the project if needed.

    2. On the Source Code Management tab, select Git and add the GitHub repository URL where the project is present.

    3. On the Build tab, provide the value in the Root POM field, then provide the Maven goal in the Goals and options field to execute.

      You can pass the environment variables, such as, -Dmaven.repo.local=C:\Users$username.m2\repository so that Jenkins can refer to a user local .m2 repository where all the dependencies are present.

  4. Click Apply and Save.
  5. Go to Project Window and click Build Now.