Day 24: Complete Jenkins CI/CD Project ????
Let's build a bang CICD pipeline for your nodejs application ??
First fork?this?repository:
How are you going to connect your GitHub repository and Jenkins task now?
Yes, via GitHub integration. Following are the steps:
Steps:
Configuring GitHub
2. Open SSH and GPG keys, add the public key you generated with ssh-keygen, and choose the authentication key key type.
Now GitHub-Webhook:(Important from interview perspective)
1. Open your GitHub repository, then select Settings.
2. Select Webhooks, and then select Add Webhook.
3. Paste the Jenkins environment URL into the "Payload URL" section; /github-webhook/ should be added at the end of this URL. Leave the "Secret" box blank and choose "application/json" under "Content type." Interviewer's perspective)
Jenkins must have the GitHub Integration plugin installed.
1. Access the Jenkins dashboard.
2. On your Jenkins dashboard, select the Manage Jenkins icon.
3. Select Manage Plugins.
4. Install the plugin for GitHub integration.
领英推荐
Configuring Jenkins:
1. Create a jenkins job
2. Create node-todo-app freestyle project
3. Add the GitHub project URL in Configure. Enter the GitHub URL for your project.
4.In Git, add credentials for jenkins
5. Add private key which we created using ssh-keygen command(in Kind select ssh username with private key)
6. Select the "GitHub hook trigger for GITScm polling" under the "Build Triggers" tab.
Task 2:
Using Docker compose, run the program in the Execute shell.
Simply edit the github code, commit, and watch the magic happen!
After building, you can check the console output.
The container has been formed, as shown by the docker ps command.
Browse public IP address with port no.8000
Huhh! providing a whole project, Thank you for reading ???????
Automating Infrastructure || Streamlining CI/CD Pipelines || Ensuring Scalable and Reliable Deployments || Accelerating Software Delivery ||
2 年Ye to mujhe pata hi nahi tha bhai... Well explained bhai ??