Day 24 Task: Complete Jenkins CI/CD Project
Day 24 of #90DaysOfDevOps: Completing Jenkins CI/CD Project
Welcome to Day 24 of the #90DaysOfDevOps challenge! Today, we're diving into the exciting world of Jenkins CI/CD pipelines. By the end of this article, you'll have a fully functional CI/CD pipeline set up for your Node.js application, ready to automate your build and deployment processes.
Task 01: Setting up Jenkins with GitHub Integration
To start, fork the repository provided for this project. This repository contains a simple Node.js application that we will use for our CI/CD pipeline.
Next, we need to set up Jenkins to integrate with our GitHub repository. This integration allows Jenkins to automatically trigger builds whenever changes are pushed to the repository.
Task 02: Running the Application with Docker Compose
Now that Jenkins is set up to integrate with GitHub, let's configure our build process to run the Node.js application using Docker Compose.
领英推荐
Example:
Let's say your GitHub repository is https://github.com/your-username/nodejs-app. After forking this repository, the URL will be https://github.com/your-username/nodejs-app.
Your docker-compose.yml file should look like this:
version: '3'
services:
app:
image: node:latest
volumes:
- .:/app
working_dir: /app
command: npm start
ports:
- "3000:3000"
And the build step in your Jenkins job configuration should include:
docker-compose up -d
Conclusion:
Congratulations! You have successfully completed Day 24 of the #90DaysOfDevOps challenge. You have set up a Jenkins CI/CD pipeline for your Node.js application, integrating with GitHub and running the application using Docker Compose. Keep up the great work, and stay tuned for more exciting challenges ahead!
Sr Analyst / Software Engineer at Capgemini
6 个月Happy Learning!!