Skip to content

pranjalisr/ProgressBar

Repository files navigation

DevOps CI/CD Pipeline Project

This project demonstrates a simple CI/CD pipeline using GitLab CI/CD for a Node.js web application. The pipeline includes testing, building a Docker image, and deploying to a Kubernetes cluster.

Project Structure

  • app.js: A simple Express.js web application
  • test/app.test.js: Unit tests for the application
  • Dockerfile: Instructions for building the application container
  • .gitlab-ci.yml: GitLab CI/CD pipeline configuration
  • kubernetes/deployment.yml: Kubernetes deployment configuration

CI/CD Pipeline

The pipeline consists of three stages:

  1. Test: Runs unit tests for the application
  2. Build: Builds a Docker image and pushes it to the GitLab Container Registry
  3. Deploy: Deploys the application to a Kubernetes cluster (staging environment)

Prerequisites

  • GitLab account and project
  • Kubernetes cluster (e.g., Google Kubernetes Engine, Amazon EKS, or Minikube for local development)
  • GitLab Runner with Docker executor

Setup

  1. Push this project to your GitLab repository
  2. Set up the following CI/CD variables in your GitLab project settings:
    • KUBE_URL: Your Kubernetes cluster API URL
    • KUBE_TOKEN: A service account token with permissions to deploy to your cluster
  3. Ensure your GitLab Runner is configured and running
  4. Trigger the pipeline by pushing a commit to the main branch

Local Development

To run the application locally:

  1. Install dependencies: npm install
  2. Start the application: node app.js
  3. Run tests: npm test

License

This project is open-source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published