Automated Jenkins CI/CD pipeline generator for multi-cloud deployments (AWS, Azure, GCP, DigitalOcean)
npm install jenkins-generator> Automated Jenkins CI/CD pipeline generator for multi-cloud deployments with external services support



Never worry about CI/CD configuration again! This tool automatically generates production-ready Jenkins pipelines for AWS, Azure, GCP, and DigitalOcean with just a few questions. Now with automatic external services configuration!
- AWS - ECS Fargate deployments with auto-scaling
- Azure - Container Instances with resource groups
- GCP - Cloud Run serverless containers
- DigitalOcean - App Platform deployments
- ๐๏ธ Databases - PostgreSQL, MongoDB, MySQL, Redis, and more
- โก Caching - Redis, Memcached, ElastiCache
- ๐จ Message Queues - RabbitMQ, Kafka, SQS, Azure Service Bus
- ๐ฆ Storage - AWS S3, Azure Blob, Google Cloud Storage, MinIO
- ๐ง Email Services - SMTP, SendGrid, AWS SES, Mailgun
- ๐ Monitoring - DataDog, Sentry, New Relic, Prometheus
- ๐ง Custom Services - Any service your app needs
- Automatic environment variable configuration
- Jenkins credentials management
- .env.template generation for local development
- AES-256 encryption for credential storage
- Masked sensitive data in logs and output
- Secure Jenkins credential references
- No hardcoded secrets in generated files
- Credential rotation reminders
- Automatic .gitignore updates to protect .env files
- Email - HTML formatted with build details
- Slack - Rich attachments with color coding
- Discord - Embedded messages with status
- Microsoft Teams - Adaptive cards
- Telegram - Markdown formatted messages
- Automated image building from your Dockerfile
- Docker Compose generation for local infrastructure testing ๐
- Registry push to Docker Hub or private registry
- Container orchestration on cloud platforms
- Health check verification
- Automatic cleanup of old images
- Environment variables injection into containers
- Optional test execution before deployment
- Configurable test commands
- Test result publishing in Jenkins
- Retry logic for flaky tests
- Infrastructure as Code (IaC) - Automatic Terraform generation ๐
- Advanced Deployments - Rolling, Blue-Green, and Canary strategies ๐
- Post-Deployment Dashboard - Visual HTML summaries ๐
- Configuration Presets - Save/Load configuration for speed ๐
- Health check endpoints with retry logic
- Load Balancer & stable DNS support
- Deployment tier management (dev/staging/production)
- Build retry logic
- Comprehensive logging
- Post-deployment verification
Before:
```
โ Manually write Jenkinsfile (hours of work)
โ Configure cloud deployment scripts
โ Set up notifications for each platform
โ Handle credentials securely
โ Configure database connections manually
โ Manage environment variables
โ Document the entire process
โ Maintain and update pipelines
After:
``
โ
Run one command: jenkins-generator
โ
Answer a few questions
โ
Configure databases, caching, queues automatically
โ
Get production-ready pipeline
โ
Automatic .env.template generation
โ
Complete documentation included
โ
Security best practices built-in
โ
Multi-cloud support out of the box
`bash`
npm install -g jenkins-generator
`bash`
npm install --save-dev jenkins-generator
- Node.js 16.0.0 or higher
- npm 7.0.0 or higher
- Git repository
- Dockerfile in your project (or we'll guide you)
- Jenkins 2.0+ with required plugins
1. Install Globably:
`bash`
npm install -g jenkins-generator
2. Run in your project root:
`bash`
jenkins-generator
You can run the generator without installing Node.js by using our official Docker image.
`bash`
docker pull your-dockerhub-username/jenkins-generator
To allow the generator to write files to your current directory, you must mount your project directory as a volume:
`bash`
docker run -it --rm -v $(pwd):/app your-dockerhub-username/jenkins-generator
---
The generator will prompt you for:
- Project Details: Name, type (frontend/backend), language (JS/TS)
- Git Info: Repository URL and branch
- Docker: Dockerfile presence and path
- External Services: Databases, Caching, Storage, etc (NEW in v2.0!)
- Cloud Provider: AWS, Azure, GCP, or DigitalOcean
- Deployment: Instance types, regions, auto-scaling
- Notifications: Slack, Discord, Teams, Telegram, Email
---
``
your-project/
โโโ Jenkinsfile # ๐ฏ Main pipeline with env vars
โโโ docker-compose.yml # ๐ณ Local infrastructure testing ๐
โโโ .env.template # ๐ Template for local development
โโโ .gitignore # ๐ Updated to exclude .env
โโโ .cicd/
โโโ README.md # ๐ Project documentation
โโโ CREDENTIALS_SETUP.md # ๐ Credential guide (with services)
โโโ config.encrypted.json # ๐ Encrypted backup
โโโ .gitignore # ๐ซ Protect secrets
Copy .env.template to .env and fill in your values:
`bash`
cp .env.template .env
nano .env # or use your favorite editor
Follow the instructions in .cicd/CREDENTIALS_SETUP.md to:
- Add credentials to Jenkins
- Configure external service credentials ๐
- Create pipeline job
- Connect to your repository
Push your code and watch Jenkins automatically:
- โ
Checkout code
- โ
Install dependencies
- โ
Load environment variables ๐
- โ
Run tests
- โ
Build application
- โ
Create Docker image
- โ
Push to registry
- โ
Deploy to cloud
- โ
Verify health
- โ
Send notifications
`bash
$ jenkins-generator
๐ Jenkins Generator
? Enter your project name: my-api
? Select project type: backend
? Select programming language: typescript
? Enter Git repository URL: https://github.com/user/my-api.git
? Does your application use external services? Yes
๐ฆ Let's configure your external services...
? Select service type: Database
? Select database type: postgresql
? Database host environment variable name: DB_HOST
? Database password environment variable name: DB_PASSWORD
? Add another service? No
? Select cloud provider: aws
? Select AWS region: us-east-1
? Enable auto-scaling? Yes
โ
Jenkins pipeline generated successfully!
`
Generated .env.template:
`env`postgres-main (postgresql)
DB_HOST=localhost
DB_PORT=5432
DB_NAME=myapp
DB_USERNAME=your_db_username_here
DB_PASSWORD=your_db_password_here
DATABASE_URL=your_database_url_here
`bash
$ jenkins-generator
? Enter your project name: my-react-app
? Select project type: frontend
? Does your application use external services? Yes
? Select service type: Storage
? Select storage service: s3
? Bucket name environment variable: S3_BUCKET
? Access key environment variable: S3_ACCESS_KEY
โ
Jenkins pipeline generated successfully!
`
- PostgreSQL
- MongoDB
- MySQL / MariaDB
- Redis
- DynamoDB
- CosmosDB
- Redis
- Memcached
- ElastiCache
- RabbitMQ
- Apache Kafka
- AWS SQS
- Azure Service Bus
- AWS S3
- Azure Blob Storage
- Google Cloud Storage
- MinIO
- DigitalOcean Spaces
- SMTP
- SendGrid
- AWS SES
- Mailgun
- Postmark
- DataDog
- New Relic
- Sentry
- Prometheus
- Grafana
- Any service with custom environment variables
Complete Jenkins pipeline with:
- Git checkout
- Dependency installation
- External services environment variables ๐
- Test execution (optional)
- Application build
- Docker image creation
- Registry push
- Cloud deployment
- Health checks
- Notifications
Example Jenkinsfile Environment Block:
`groovy
environment {
// Cloud credentials
AWS_ACCESS_KEY_ID = credentials('aws-access-key-id')
// Database credentials (auto-generated)
DB_HOST = '${env.DB_HOST ?: ""}'
DB_USERNAME = credentials('db-username')
DB_PASSWORD = credentials('db-password')
// Redis credentials
REDIS_HOST = '${env.REDIS_HOST ?: ""}'
REDIS_PASSWORD = credentials('redis-password')
// S3 credentials
S3_BUCKET = '${env.S3_BUCKET ?: ""}'
S3_ACCESS_KEY = credentials('s3-access-key')
}
`
- README.md - Project-specific pipeline documentation
- CREDENTIALS_SETUP.md - Step-by-step Jenkins credential setup (includes external services) ๐
- config.encrypted.json - Encrypted configuration backup
- .env.template - Template for local development ๐
- EXTERNAL_SERVICES_GUIDE.md - Complete guide for services configuration ๐
| Provider | Service | Features |
| ---------------- | ------------------- | --------------------------------------------- |
| AWS | ECS Fargate | Auto-scaling, Health checks, CloudWatch logs |
| Azure | Container Instances | Resource groups, Managed identities |
| GCP | Cloud Run | Serverless, Auto-scaling, Built-in monitoring |
| DigitalOcean | App Platform | Simple deployment, Automatic SSL |
- AES-256 Encryption for credential storage
- Masked credentials in all output and logs
- Jenkins credential storage integration
- No plain-text secrets in generated files
- Security best practices documentation
- Credential rotation reminders
- Automatic .gitignore protection for .env files ๐
- Secret vs non-secret detection for environment variables ๐
- Setup Guide - Complete installation and setup
- External Services Guide - Configuration for databases, caching, etc. ๐
- Deployment Checklist - Pre/post deployment steps
- Troubleshooting - Common issues and solutions
Required plugins (automatically documented in generated files):
- Docker Pipeline
- Git Plugin
- Email Extension Plugin
- Pipeline Plugin
- Credentials Binding Plugin
- Blue Ocean (optional)
You'll need credentials for your chosen cloud provider:
AWS:
- Access Key ID
- Secret Access Key
Azure:
- Subscription ID
- Client ID
- Client Secret
- Tenant ID
GCP:
- Project ID
- Service Account Key File
DigitalOcean:
- API Token
`bashReinstall globally
npm install -g jenkins-generator
$3
- Ensure Dockerfile exists at specified path
- Check path is relative to project root
- Verify file name is exactly
Dockerfile (case-sensitive)$3
- Verify database credentials in Jenkins
- Check network connectivity from Jenkins to database
- Ensure firewall rules allow connection
- Verify environment variables are loaded correctly
$3
- Verify cloud provider credentials in Jenkins
- Check instance type availability in selected region
- Review deployment logs in cloud console
- Ensure sufficient permissions/quotas
$3
For more troubleshooting, check the generated
.cicd/README.md in your project.๐ What's New in v2.2.0
$3
- โ
Infrastructure as Code (IaC) - Generate Terraform scripts for AWS, Azure, GCP, and DigitalOcean
- โ
Docker Compose Generation - Automatic local infrastructure setup (versioned and validated) ๐
- โ
OIDC Authentication - Support for secure, token-based authentication (Web Identity Federation)
- โ
Deployment Strategies - Integrated Rolling, Blue-Green, and Canary deployment support
- โ
Visual Dashboard - Post-deployment HTML summary for quick status overview
- โ
Configuration Presets - Save your answers to
jenkins-generator-config.json for rapid re-runs
- โ
Improved Validation - Robust Git URL and port validation suite๐ What's New in v2.1.0
$3
- โ
Load Balancer Integration - Support for stable DNS URLs in deployment and health checks
- โ
Enhanced Health Checks - Robust curl-based retries with dynamic URL extraction
- โ
Multi-Cloud Registry support - Native integration with ECR, ACR, GCR, and DO Registry
- โ
Full Containerization - Ready-to-use Docker image for easy distribution
๐ What's New in v2.0.0
$3
- โ
External Services Configuration - Automatically configure databases, caching, queues, storage, and more
- โ
Environment Variables Management - Automatic generation and injection
- โ
.env.template Generation - For local development
- โ
20+ Services Supported - PostgreSQL, MongoDB, Redis, S3, SMTP, Kafka, and more
- โ
Automatic Jenkins Credentials - Generates complete credential setup guide
- โ
Security Enhancements - Automatic secret detection and .gitignore updates
- โ
Complete Documentation - New EXTERNAL_SERVICES_GUIDE.md
$3
None! v2.0.0 is fully backward compatible with v1.0.0. If you don't configure external services, it works exactly like v1.0.0.
๐ค Contributing
Contributions are welcome! Please:
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests if applicable
5. Submit a pull request
๐ License
MIT License - see LICENSE file for details
๐ Acknowledgments
- Built with NestJS
- Powered by TypeScript
- CLI powered by Inquirer
- Styled with Chalk
๐ Support
- ๐ง Email: sulabhadhikari90@gmail.com
- ๐ Issues: GitHub Issues
- ๐ Docs: Full documentation in generated
.cicd/ folderโญ Show Your Support
If this tool helped you, please:
- โญ Star the repository
- ๐ฆ Tweet about it
- ๐ Write a blog post
- ๐ฌ Tell your friends
- You can also buy me a coffee
---
Made with โค๏ธ by developers, for developers
_Stop configuring CI/CD manually. Start deploying automatically!_
`bash
npm install -g jenkins-generator
cd your-project
jenkins-generator
Configure your services, deploy! ๐
``