# Day24-Complete Jenkins CI/CD Project

Task-01

\-Fork this repository:

\-Create a connection to your Jenkins job and your GitHub Repository via GitHub Integration. -Read About GitHub WebHooks and make sure you have CI/CD setup

1(i)-&gt; [https://github.com/LondheShubham153/node-todo-cicd](https://github.com/LondheShubham153/node-todo-cicd)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681209616385/956c984d-92b6-4366-9cc0-580a175f2e08.png align="center")

1. Open Jenkins.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681214500219/7350789a-bfcf-4f56-affe-da265f92a035.png align="center")
    
2. Click on Create a job.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681209986947/e76c12aa-a8d6-4b0b-a134-32b43986986c.png align="center")

3\. Enter name and click on freestyle project and finally click on ok.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681210102591/0bdb18d8-7b65-4da5-9305-9739014d1630.png align="center")

4\. Provide GitHub URL.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681210365168/802df6ab-672e-4a15-b381-4402428a7044.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681210368642/b1455409-449a-4058-a17f-ff5859f0d9c6.png align="center")

5\. Click on Build Steps and select Execute Shell.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681210436431/fdf863c4-dd92-47bf-81eb-66d8c52c7430.png align="center")

6\. Click on the Save button and the job will appear on the dashboard screen.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681210496755/9f1a7f99-8677-4295-b721-69c34c5e7f6a.png align="center")

7\. Click on job-&gt;configure and select “**GitHub hook trigger for GITScm polling**".

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681210684869/471414ce-3ff9-4970-8a08-68c60c6fbde1.png align="center")

8\. Add a webhook. To add it, follow the section given below.

9\. Make any changes in the GitHub repo and edit any header file. The job will run automatically and changes will be made.

# **Adding Jenkins Webhook in Github**

1. Open the GitHub repository.
    
2. Go to “settings” and then to “hooks”.
    
3. Click the “Add webhook” button. Enter “**&lt;Jenkins url&gt;//GitHub-webhook/**” Payload URL. Click on Add Webhook
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681210879980/9122c333-e48e-4ec3-a152-8e298f02efce.png align="center")

\-Task-02

In the Execute shell run the application using Docker Compose You will have to make a Docker Compose file for this Project (Which can be a good open-source contribution) Run the project and give yourself a treat:)

1. Give docker commands in the executing shell(The project should be integrated with GitHub repo and Jenkins). Click on save.
    
    2\. Click on build now The job will run successfully.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681213200489/8dd87b82-2616-4eaa-8980-8c5ce181a574.png align="center")

### Thank you for reading my blog
