mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-25 06:04:54 +00:00
229 lines
7.0 KiB
JSON
229 lines
7.0 KiB
JSON
{
|
|
"title": "CI/CD Guide",
|
|
"subtitle": "Complete deployment automation for multiple platforms",
|
|
"overview": "CodeForge includes production-ready CI/CD configurations for GitHub Actions, GitLab CI, Jenkins, and CircleCI. Each pipeline includes linting, testing, security scanning, Docker image building, and automated deployment workflows.",
|
|
"platforms": [
|
|
{
|
|
"name": "GitHub Actions",
|
|
"file": ".github/workflows/ci.yml",
|
|
"description": "Complete CI/CD with GHCR Docker registry integration",
|
|
"features": [
|
|
"Parallel lint and test execution",
|
|
"E2E tests with Playwright",
|
|
"Docker build and push to GitHub Container Registry",
|
|
"Security scanning with Trivy",
|
|
"Automated staging and production deployments",
|
|
"Release workflow with versioned artifacts"
|
|
]
|
|
},
|
|
{
|
|
"name": "GitLab CI",
|
|
"file": ".gitlab-ci.yml",
|
|
"description": "Multi-stage pipeline with GitLab Container Registry",
|
|
"features": [
|
|
"Dependency caching for faster builds",
|
|
"Coverage reporting with Cobertura",
|
|
"Docker-in-Docker builds",
|
|
"Manual production approval gates",
|
|
"Webhook-based deployment triggers"
|
|
]
|
|
},
|
|
{
|
|
"name": "Jenkins",
|
|
"file": "Jenkinsfile",
|
|
"description": "Declarative pipeline with Slack notifications",
|
|
"features": [
|
|
"Node.js environment configuration",
|
|
"HTML report publishing for tests and coverage",
|
|
"Artifact archiving and fingerprinting",
|
|
"Manual production deployment approval",
|
|
"Slack integration for deployment notifications"
|
|
]
|
|
},
|
|
{
|
|
"name": "CircleCI",
|
|
"file": ".circleci/config.yml",
|
|
"description": "Workflow orchestration with orb integrations",
|
|
"features": [
|
|
"Docker layer caching for optimization",
|
|
"Job dependency management",
|
|
"Test results and artifact storage",
|
|
"Approval workflows for production",
|
|
"Slack notifications via orb"
|
|
]
|
|
}
|
|
],
|
|
"pipelineStages": [
|
|
{
|
|
"stage": "Lint",
|
|
"description": "ESLint and TypeScript type checking to ensure code quality",
|
|
"duration": "~1-2 min"
|
|
},
|
|
{
|
|
"stage": "Test",
|
|
"description": "Unit tests with coverage reporting and result artifacts",
|
|
"duration": "~2-3 min"
|
|
},
|
|
{
|
|
"stage": "Build",
|
|
"description": "Production build with artifact generation for deployment",
|
|
"duration": "~2-4 min"
|
|
},
|
|
{
|
|
"stage": "E2E Tests",
|
|
"description": "Playwright end-to-end tests with HTML reports",
|
|
"duration": "~3-5 min"
|
|
},
|
|
{
|
|
"stage": "Security",
|
|
"description": "npm audit and Trivy vulnerability scanning",
|
|
"duration": "~1-2 min"
|
|
},
|
|
{
|
|
"stage": "Docker Build",
|
|
"description": "Multi-stage Docker image build and push to registry",
|
|
"duration": "~3-5 min"
|
|
},
|
|
{
|
|
"stage": "Deploy",
|
|
"description": "Automated deployment to staging and production environments",
|
|
"duration": "~1-3 min"
|
|
}
|
|
],
|
|
"dockerConfig": {
|
|
"files": [
|
|
{
|
|
"file": "Dockerfile",
|
|
"description": "Multi-stage build with Node.js builder and Nginx runtime"
|
|
},
|
|
{
|
|
"file": "nginx.conf",
|
|
"description": "Production Nginx configuration with health checks and caching"
|
|
},
|
|
{
|
|
"file": "docker-compose.yml",
|
|
"description": "Local development and deployment orchestration"
|
|
},
|
|
{
|
|
"file": ".dockerignore",
|
|
"description": "Optimized build context by excluding unnecessary files"
|
|
}
|
|
],
|
|
"features": [
|
|
"Multi-stage build reduces final image size to ~50MB",
|
|
"Nginx serves static files with gzip compression",
|
|
"Health check endpoint at /health for orchestration",
|
|
"Automatic cache headers for static assets",
|
|
"SPA routing support with fallback to index.html"
|
|
]
|
|
},
|
|
"environmentVariables": [
|
|
{
|
|
"variable": "NODE_VERSION",
|
|
"description": "Node.js version (default: 20)",
|
|
"required": false
|
|
},
|
|
{
|
|
"variable": "REGISTRY",
|
|
"description": "Docker registry URL (default: ghcr.io)",
|
|
"required": false
|
|
},
|
|
{
|
|
"variable": "STAGING_WEBHOOK_URL",
|
|
"description": "Webhook for staging deployments",
|
|
"required": false
|
|
},
|
|
{
|
|
"variable": "PRODUCTION_WEBHOOK_URL",
|
|
"description": "Webhook for production deployments",
|
|
"required": false
|
|
},
|
|
{
|
|
"variable": "CODECOV_TOKEN",
|
|
"description": "Codecov integration token",
|
|
"required": false
|
|
},
|
|
{
|
|
"variable": "SLACK_WEBHOOK",
|
|
"description": "Slack webhook for notifications",
|
|
"required": false
|
|
}
|
|
],
|
|
"branchStrategy": [
|
|
{
|
|
"branch": "main",
|
|
"description": "Production branch - deploys to production environment (manual approval required)",
|
|
"color": "green"
|
|
},
|
|
{
|
|
"branch": "develop",
|
|
"description": "Development branch - automatically deploys to staging environment",
|
|
"color": "blue"
|
|
},
|
|
{
|
|
"branch": "feature/*",
|
|
"description": "Feature branches - runs tests only, no deployment",
|
|
"color": "purple"
|
|
},
|
|
{
|
|
"branch": "v* tags",
|
|
"description": "Version tags - triggers release workflow with artifacts and changelog",
|
|
"color": "orange"
|
|
}
|
|
],
|
|
"quickStart": [
|
|
{
|
|
"step": 1,
|
|
"title": "Choose Your Platform",
|
|
"description": "Select GitHub Actions, GitLab CI, Jenkins, or CircleCI based on your infrastructure"
|
|
},
|
|
{
|
|
"step": 2,
|
|
"title": "Configure Secrets",
|
|
"description": "Add required environment variables and secrets in your platform's settings"
|
|
},
|
|
{
|
|
"step": 3,
|
|
"title": "Push to Repository",
|
|
"description": "Push code to main or develop branch to trigger the CI/CD pipeline"
|
|
},
|
|
{
|
|
"step": 4,
|
|
"title": "Monitor Pipeline",
|
|
"description": "View pipeline status, test results, and deployment logs in your platform's dashboard"
|
|
}
|
|
],
|
|
"bestPractices": [
|
|
"Never commit secrets - use environment variables and platform secret management",
|
|
"Enable branch protection on main and develop branches",
|
|
"Require code reviews and passing tests before merging",
|
|
"Use manual approval gates for production deployments",
|
|
"Monitor security scan results and fix vulnerabilities promptly",
|
|
"Keep dependencies updated with Dependabot or Renovate",
|
|
"Use semantic versioning for releases (v1.0.0, v1.1.0, etc.)",
|
|
"Configure Slack or email notifications for deployment status"
|
|
],
|
|
"additionalResources": [
|
|
{
|
|
"file": "CI_CD_GUIDE.md",
|
|
"description": "Detailed setup guide for all platforms"
|
|
},
|
|
{
|
|
"file": ".github/workflows/",
|
|
"description": "GitHub Actions workflows"
|
|
},
|
|
{
|
|
"file": ".gitlab-ci.yml",
|
|
"description": "GitLab CI configuration"
|
|
},
|
|
{
|
|
"file": "Jenkinsfile",
|
|
"description": "Jenkins pipeline definition"
|
|
},
|
|
{
|
|
"file": ".circleci/config.yml",
|
|
"description": "CircleCI configuration"
|
|
}
|
|
]
|
|
}
|