Day 24 Task: Complete Jenkins CI/CD Project
Let's make a beautiful CI/CD Pipeline for your Node JS Application đ
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
Go to your GitHub account settings.
Go to SSH and GPG keys, Add public key that we created using ssh-keygen, and select key-type Authentication key.
For GitHub-Webhook:
Go to your GitHub repository and click on Settings.
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.
Go to Jenkins are click on new-item to create a project.
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!