Complete Jenkins CI/CD Project (03) : Day - 41

Table of contents

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

Task-01

  1. I have forked the repository: github.com/Namg04/node-todo-cicd for "node-todo-cicd" project

  2. Create a connection to your Jenkins job and your GitHub Repository via GitHub Integration.

    Select "GitHub hook trigger for GITScm polling"

    Add build steps

  3. Configure GitHub Webhook:

    1. Open your GitHub repository in your browser.

    2. Go to the repository's "Settings" tab.

    3. Select "Webhooks" from the left-hand menu.

    4. Click on the "Add webhook" button.

    5. In the "Payload URL" field, enter the Jenkins server URL.

    6. For "Content type," choose "application/JSON."

    7. Select the events that you want to trigger in the webhook. The most common event is "push," which triggers when code is pushed to the repository.

    8. Click "Add webhook" to save the webhook configuration.

    9. Refresh the page:

  4. Save the configuration and there are no builds created as of now

  5. To test the GitHub webhook let's make some changes in the GitHub repo and commit the changes.

  6. As soon I committed the changes, the webhook sent a request to the Jenkins job's URL and it triggered the Jenkins job automatically to run specified build steps to deploy the node-todo-cicd-app.

  7. Access your app through Jenkins URL

    💥Boom node-todo-cicd project has deployed successfully through WebHook💥

Task-02

  1. In the Execute shell run the application using Docker compose

  2. You will have to make a Docker Compose file for this Project (Can be a good open-source contribution)

  1. Commit changes

  1. Run the project and give yourself a treat:)

Thank you for reading. Happy Learning!!!😊