Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 2.61 KB

File metadata and controls

45 lines (34 loc) · 2.61 KB

Walkthrough: Jenkins CI/CD System Setup

We have successfully initialized and verified a standard CI/CD system with Jenkins and Telegram integration. The project skeleton includes a React/TypeScript frontend (Vite), Node.js backend, MongoDB, and PostgreSQL database.


🛠️ Changes Implemented

We created the following components:

1. Backend Service (backend/)

  • package.json: Defines Express dependencies, MongoDB connection client (mongoose), and PostgreSQL client (pg).
  • src/index.js: Exposes the /api/health checking route that monitors active db connections with self-healing retry cycles.
  • Dockerfile: Standard lightweight Alpine runtime definition.

2. Frontend Dashboard (frontend/)

  • package.json & tsconfig.json: React/TS setup.
  • src/App.tsx: A modern, glassmorphic layout. It includes:
    • Active indicators polling the backend for DB connectivity state.
    • An interactive Jenkins Pipeline Simulator showing stage states and transition indicators.
    • Samples of the Telegram alert messages.
  • Dockerfile: Multi-stage container compilation using Nginx to serve optimized static frontend assets.

3. Orchestration & Automation

  • docker-compose.yml: Coordinates local and container production runs of the database instances, backend, and frontend.
  • Jenkinsfile: Standard declarative Jenkins pipeline config orchestrating quality, testing, build, deploy, and alerting.
  • jenkins/scripts/telegram-notify.sh: A shell script with full HTML tag escaping to safely trigger Telegram Bot API alerts with commit author, commit message, and build durations.

🧪 Verification Results

1. Bash Syntax Validation

  • Ran syntax validation checks on telegram-notify.sh:
    bash -n jenkins/scripts/telegram-notify.sh
    Result: Pass (No syntax warnings).

2. Docker Compose Build

  • Tested containerization step via:
    docker compose build
    Result: Build complete and images successfully compiled (Nginx asset generation and Node dependency cache cycles working correctly).