# Day 23 : Complete Jenkins CI/CD Project.

***Let's make a beautiful CI/CD Pipeline for your Node JS Application***

Task:01

1. **<mark>Fork </mark>** [**<mark>this</mark>**](https://github.com/LondheShubham153/node-todo-cicd.git) **<mark> repository:</mark>**
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1701619622214/40188b59-746b-412c-91bc-77816e749556.png align="center")
    
    1. Create a connection to your Jenkins job and your GitHub Repository via GitHub Integration.
        
        Webhooks provide a way for notifications to be delivered to an external web server whenever certain actions occur on a repository or organization.
        
        **For GitHub-Webhook:**
        
        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.
            
            ![how to add webhook in gitHub](https://cdn.hashnode.com/res/hashnode/image/upload/v1701621392635/819d0206-88eb-4211-b39b-f7e6a42ad538.png align="center")
            
            # **<mark>Task-02</mark>:**
            
            * In the Execute shell run the application using Docker compose
                
            * You will have to make a Docker Compose file for this Project.
                
                <mark>Steps:</mark>
                
                For the GitHub integration plugin
                
                Click on Manage Jenkins &gt;Manage plugin &gt; Available plugin&gt; GitHub integration &gt; Install it
                

2.Create ssh public and private keys in your EC2 for Github and jenkijns ssh in automatic when the code change in developer then push it github so automatical build in jenkins useing GitHub webhook.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1701625701555/92bd1c3b-21e8-4d9f-bda1-50c2a36e5c45.png align="center")

we want to ssh in github using jenkis so will put in public key in github and private key in jenkins.

1\. How to push github--login&lt;github&lt;gitHub account&lt;setting&lt;ssh.key GPG key&lt;add

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1701626138868/98a0a2a1-5071-446a-b276-5b0cde2eb65b.png align="center")

2\. login jenkins and create a freestyle job and all select option as per project requirment.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1701626670771/fd5be510-66f1-4714-8faa-75ab45a46c84.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1701626961136/bb7a8716-6ede-4d74-be95-7f100c247ca0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1701627042950/ea39fa79-f864-4eca-b6c1-6f771c8039ce.png align="center")

Then check out of weabook connection in Github it should have green.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1701627211107/cf63553f-5754-4ca4-a29c-fc6c0dfa3321.png align="center")

check it web access

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1701627311954/43b3ebb7-82c7-4737-bd2c-75e1c51c65b6.png align="center")

we did some change in git repo that using in jenkind so merge in master branch that will do jenkin using webhook service that vcode build in server.

1\. i did some change in git repo then merge in master branch

go to my github account&lt;Repo&lt;change&lt;merge&lt;master branch.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1701627615062/f9302887-6d98-4089-acec-9f825f9629e2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1701627730906/72c62a6b-81a0-4dfb-b21c-6cd5691f3c32.png align="center")

### **Conclusion :**

In this blog, we cover how we can make a CI/CD pipeline Jenkins with the help of webhooks.

Thanks for read my blog if you like this blog that please like&Commend

Contact me on [linkedin](http://www.linkedin.com/in/pradeep-chitroliya-9347a9147)

check out my gitHub for more sresource [GitHub](https://github.com/ChitrolyaPradeep)
