Package Exports
- jenkins-generator
- jenkins-generator/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jenkins-generator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Jenkins Generator ๐
Automated Jenkins CI/CD pipeline generator for multi-cloud deployments
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.
โจ Features
๐ Multi-Cloud Support
- AWS - ECS Fargate deployments with auto-scaling
- Azure - Container Instances with resource groups
- GCP - Cloud Run serverless containers
- DigitalOcean - App Platform deployments
๐ Security First
- 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
๐ง Multi-Channel Notifications
- 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
๐ณ Docker-Based Deployments
- Automated image building from your Dockerfile
- Registry push to Docker Hub or private registry
- Container orchestration on cloud platforms
- Health check verification
- Automatic cleanup of old images
๐งช Testing Integration
- Optional test execution before deployment
- Configurable test commands
- Test result publishing in Jenkins
- Retry logic for flaky tests
๐ Advanced Features
- Auto-scaling configuration
- Health check endpoints
- Deployment tier management (dev/staging/production)
- Build retry logic
- Comprehensive logging
- Post-deployment verification
๐ฏ Why Use This?
Before:
โ Manually write Jenkinsfile (hours of work)
โ Configure cloud deployment scripts
โ Set up notifications for each platform
โ Handle credentials securely
โ Document the entire process
โ Maintain and update pipelinesAfter:
โ
Run one command: jenkins-generator
โ
Answer a few questions
โ
Get production-ready pipeline
โ
Complete documentation included
โ
Security best practices built-in
โ
Multi-cloud support out of the box๐ฆ Installation
Global Installation (Recommended)
npm install -g jenkins-generatorLocal Installation
npm install --save-dev jenkins-generatorRequirements
- 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
๐ Quick Start
1. Navigate to Your Project
cd your-awesome-project2. Run the Generator
jenkins-generator3. Answer Questions
The CLI will ask you about:
- Project details (name, type, language)
- Git repository and branch
- Docker configuration
- Testing preferences
- Cloud provider selection
- Deployment settings
- Notification channels
- Jenkins configuration
4. Review Generated Files
your-project/
โโโ Jenkinsfile # ๐ฏ Main pipeline
โโโ .cicd/
โโโ README.md # ๐ Project documentation
โโโ CREDENTIALS_SETUP.md # ๐ Credential guide
โโโ config.encrypted.json # ๐ Encrypted backup
โโโ .gitignore # ๐ซ Protect secrets5. Configure Jenkins
Follow the instructions in .cicd/CREDENTIALS_SETUP.md to:
- Add credentials to Jenkins
- Create pipeline job
- Connect to your repository
6. Deploy!
Push your code and watch Jenkins automatically:
- โ Checkout code
- โ Install dependencies
- โ Run tests
- โ Build application
- โ Create Docker image
- โ Push to registry
- โ Deploy to cloud
- โ Verify health
- โ Send notifications
๐ Usage Examples
Example 1: Node.js API on AWS
$ 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
? Enter branch name to deploy: master
? Does your project have a Dockerfile? Yes
? Should tests run before deployment? Yes
? Select cloud provider: aws
? Select AWS region: us-east-1
? Select instance type: t2.small
? Enable auto-scaling? Yes
โ
Jenkins pipeline generated successfully!Example 2: React App on GCP
$ jenkins-generator
? Enter your project name: my-react-app
? Select project type: frontend
? Select programming language: javascript
? Select cloud provider: gcp
? Select GCP region: us-central1
โ
Jenkins pipeline generated successfully!๐๏ธ What Gets Generated
Jenkinsfile
Complete Jenkins pipeline with:
- Git checkout
- Dependency installation
- Test execution (optional)
- Application build
- Docker image creation
- Registry push
- Cloud deployment
- Health checks
- Notifications
Documentation
- README.md - Project-specific pipeline documentation
- CREDENTIALS_SETUP.md - Step-by-step Jenkins credential setup
- config.encrypted.json - Encrypted configuration backup
๐ง Supported Cloud Providers
| 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 |
๐ Security Features
- 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
๐ Documentation
- Setup Guide - Complete installation and setup
- Deployment Checklist - Pre/post deployment steps
- Troubleshooting - Common issues and solutions
๐ ๏ธ Requirements
Jenkins Plugins
Required plugins (automatically documented in generated files):
- Docker Pipeline
- Git Plugin
- Email Extension Plugin
- Pipeline Plugin
- Credentials Binding Plugin
- Blue Ocean (optional)
Cloud Provider Credentials
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
๐ Troubleshooting
Issue: "Command not found"
# Reinstall globally
npm install -g jenkins-generator
# Or check npm global bin path
npm config get prefixIssue: "Dockerfile not found"
- Ensure Dockerfile exists at specified path
- Check path is relative to project root
- Verify file name is exactly
Dockerfile(case-sensitive)
Issue: "Deployment failed"
- Verify cloud provider credentials in Jenkins
- Check instance type availability in selected region
- Review deployment logs in cloud console
- Ensure sufficient permissions/quotas
More Help
For more troubleshooting, check the generated .cicd/README.md in your project.
๐ค Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- 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
Made with โค๏ธ by developers, for developers
Stop configuring CI/CD manually. Start deploying automatically!
npm install -g jenkins-generator
cd your-project
jenkins-generator
# That's it! ๐