JSPM

jenkins-generator

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q36300F
  • License MIT

Automated Jenkins CI/CD pipeline generator for multi-cloud deployments (AWS, Azure, GCP, DigitalOcean)

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

npm version License: MIT Node.js

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 pipelines

After:

โœ… 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

npm install -g jenkins-generator

Local Installation

npm install --save-dev jenkins-generator

Requirements

  • 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-project

2. Run the Generator

jenkins-generator

3. 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 secrets

5. 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

๐Ÿ› ๏ธ 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 prefix

Issue: "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:

  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

๐Ÿ“ž Support

โญ 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! ๐ŸŽ‰