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.
We created the following components:
- package.json: Defines Express dependencies, MongoDB connection client (mongoose), and PostgreSQL client (pg).
- src/index.js: Exposes the
/api/healthchecking route that monitors active db connections with self-healing retry cycles. - Dockerfile: Standard lightweight Alpine runtime definition.
- 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.
- 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.
- Ran syntax validation checks on telegram-notify.sh:
Result: Pass (No syntax warnings).
bash -n jenkins/scripts/telegram-notify.sh
- Tested containerization step via:
Result: Build complete and images successfully compiled (Nginx asset generation and Node dependency cache cycles working correctly).
docker compose build