Day 24 Task: Complete Jenkins CI/CD Project

Day 24 Task: Complete Jenkins CI/CD Project

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

¡

2 min read

Task-01

  • Fork this repository:

    This is a node-todo-cicd repo.

    • Setup the Jenkins and Make sure Jenkins are all the plugins are installed on the system.

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

Configuring GitHub

  1. Go to your GitHub account settings.

  2. Go to SSH and GPG keys, Add public key that we created using ssh-keygen, and select key-type Authentication key.

    For GitHub-Webhook:

    1. Go to your GitHub repository and click on Settings.

    2. Click on Webhooks and then click on Add Webhook.

3. In the ‘Payload URL’ field, paste your Jenkins environment URL. At the end of this URL add /GitHub-webhook/. In the ‘Content type’ select: ‘application/json’ and leave the ‘Secret’ field empty.

Now CI/CD is all setup, we can start with our project.

  1. Go to Jenkins are click on new-item to create a project.

  2. Select a freestyle project and name the project.

In Configure, GitHub project URL write your project GitHub URL

Click on the ‘Build Triggers’ tab and then on the ‘GitHub hook trigger for GITScm polling’.

Task-02

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

  • You will have to make a Docker Compose file for this Project.

    The build is triggered, After the build you can check the console output.

Happy Learning!

Â