Day 24 & 25 Jenkins CI/CD Project: To-Do List
Ketan Hiray
2 min read
Task 1: Set up a connection between the Jenkins job and the GitHub repository.👨🏻💻
➤Steps:
╰┈➤Create Keys
ssh-keygen
cd .ssh
cat <public key>
╰┈➤Add the public key to the GitHub SSH keys section.
╰┈➤Add Key
╰┈➤Copy the GitHub repository URL and paste it into Jenkins' new job > Configuration > GitHub Project.
╰┈➤Paste the GitHub repository URL in the Source Code Management section.
╰┈➤Capy Private key
╰┈➤Paste the private key into the Jenkins job credentials section.
╰┈➤Select the created credential that we have created.
╰┈➤Add Docker commands in the Build steps and save.
╰┈➤Run the Job
╰┈➤Job Run Successfully
╰┈➤Output- Check out https://<ip>:8000
Task 2: Set up a connection between the Jenkins job and the GitHub repository through GitHub Integration.🤖
➤Steps:
╰┈➤Kill the running Docker container
╰┈➤Navigate Manage Jenkins> Plugins > Available plugins
╰┈➤Search GitHub Integration
and install
╰┈➤Open the GitHub Navigate Webhooks and Add Jenkins URL
╰┈➤After Adding wait for "✔️"
╰┈➤Jenkins job configuration > Check the Build Triggers
╰┈➤When we make some Changes in the Code and commit the code
╰┈➤Then Jenkins's job will trigger automatically
╰┈➤Job Run Successfully
╰┈➤Output after code changes
🟣Conclusion :
We have completed our CI/CD project.
0
Subscribe to my newsletter
Read articles from Ketan Hiray directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Ketan Hiray
Ketan Hiray
💼 Senior Software Engineer 🚀 Enthusiast in DevOps Engineering