Skip to main content

Command Palette

Search for a command to run...

Day 24:Complete Jenkins CI/CD Project

Published
2 min read
Day 24:Complete Jenkins CI/CD Project
A

Hello, I am Akshay Phadke I have 10 Yrs of Experience in various Technologies. Currently, I am learning a few DevOps tools. I am working on Microsoft Technologies and AWS

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

Task-01

1)Fork this repository:

As had already forked the repository see previous articles

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

Generate the SSH keys for integrating your Jenkins project with your git repository. Use ssh-keygen command to create public and private key.

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.

Thus with above command you will get Public key and add this public key in “Key” Section of “SSH & GPG Keys”

For GitHub-Webhook:

Webhooks provide a way for notifications to be delivered to an external web server whenever certain actions occur on a repository or organization.

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.

For Installing GitHub Integration plugin in Jenkins

1)Open your jenkins dashboard.

2)Click on the Manage Jenkins button on your Jenkins dashboard

3)Click on Manage Plugins

4)Install GitHub Integration plugin

Configuring Jenkins:

1)Create a jenkins job

4)Select the “Git” and provide the below credentials

Click on ADD and for the “kind” label select from the drop down list for

5)Add private key which we created using ssh-keygen command.

Provide Unique ID, Description and then paste the “Private key “ at last as “Paraphrase” and click on ADD

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

Once the connection between the Jenkins server and Github is successful a green tick as highlighted below will be shown.

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

3)After the build you can check the console output.

Now browse the URL with your public IP address with 8000 port. Before that allow 8000 ports in security groups.

More from this blog

Untitled Publication

80 posts