Skip to content

radaisystems/central-cicd-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Centralized CI/CD Pipeline System

A comprehensive centralized CI/CD pipeline management system built for Backstage that allows you to trigger deployments for any registered repository and environment from a single interface.

๐Ÿš€ Features

  • Centralized Dashboard: Manage all your deployments from one place
  • Multi-Environment Support: Deploy to dev, staging, production, and custom environments
  • Repository Registry: Automatically discover and register repositories
  • Real-time Status: Track deployment progress and status
  • Rollback Support: Quick rollback capabilities for failed deployments
  • Audit Trail: Complete deployment history and logs
  • Security: Environment-based access controls and approvals

๐Ÿ“‹ System Components

1. Pipeline Dashboard (/central-cicd)

  • Repository selection and environment targeting
  • Deployment triggering interface
  • Real-time status monitoring
  • Deployment history and logs

2. Repository Registry (config/repositories.yaml)

  • Centralized repository configuration
  • Environment mapping per repository
  • Workflow file specifications
  • Access control settings

3. Workflow Dispatcher (.github/workflows/central-dispatcher.yml)

  • Triggers deployments in target repositories
  • Handles cross-repository workflow execution
  • Manages deployment queuing and concurrency
  • Provides status updates back to dashboard

4. Environment Manager (config/environments.yaml)

  • Environment-specific configurations
  • Deployment approval requirements
  • Resource limits and constraints
  • Notification settings

๐Ÿ”ง Configuration

Repository Registration

Add repositories to config/repositories.yaml:

repositories:
  - name: "my-service"
    owner: "{{ values.githubOrg }}"
    description: "My awesome service"
    environments:
      - dev
      - staging
      - production
    workflow_file: ".github/workflows/ci-cd.yml"
    default_branch: "main"
    access_control:
      dev: ["developers"]
      staging: ["developers", "qa"]
      production: ["platform-team", "leads"]

Environment Configuration

Configure environments in config/environments.yaml:

environments:
  dev:
    name: "Development"
    auto_deploy: true
    approval_required: false
    cluster: "aux-services-dev"
    namespace_prefix: "dev-"
    
  staging:
    name: "Staging"
    auto_deploy: false
    approval_required: true
    approvers: ["platform-team"]
    cluster: "aux-services-staging-large"
    namespace_prefix: "staging-"
    
  production:
    name: "Production"
    auto_deploy: false
    approval_required: true
    approvers: ["platform-team", "leads"]
    cluster: "aux-services-prod-large"
    namespace_prefix: "prod-"
    rollback_enabled: true

๐Ÿš€ Usage

1. Configure Authentication

Set up GitHub token authentication in your Backstage configuration:

# app-config.yaml
centralCicd:
  baseUrl: https://api.github.com/repos/{{ values.githubOrg }}/{{ values.pipelineName }}
  githubToken: ${GITHUB_TOKEN} # Your GitHub Personal Access Token

Make sure your GitHub token has the following scopes:

  • repo (repository access)
  • actions:write (trigger workflows)
  • workflow (workflow dispatch)

2. Access the Dashboard

Navigate to: https://backstage.radai-systems.com/central-cicd

3. Select Repository and Environment

  1. Choose the repository you want to deploy
  2. Select the target environment
  3. Optionally specify a branch or tag

4. Trigger Deployment

  1. Click "Deploy" to start the deployment
  2. Monitor progress in real-time
  3. View logs and status updates

5. Manage Deployments

  • View History: See all past deployments
  • Rollback: Quickly revert to previous versions
  • Cancel: Stop running deployments
  • Retry: Re-run failed deployments

๐Ÿ” Security & Access Control

Environment-Based Permissions

  • Development: Open access for developers
  • Staging: Requires approval from QA or platform team
  • Production: Requires approval from platform team and leads

Audit Trail

  • All deployments are logged with user, timestamp, and changes
  • Integration with Backstage audit system
  • Slack/Teams notifications for production deployments

๐Ÿ“Š Monitoring & Observability

Deployment Metrics

  • Success/failure rates per repository and environment
  • Deployment frequency and duration
  • Rollback frequency and reasons

Integration with Existing Tools

  • Grafana: Deployment dashboards and alerts
  • Slack: Real-time notifications
  • Linear: Automatic issue linking
  • GitHub: Status checks and PR integration

๐Ÿ› ๏ธ Development

Adding New Repositories

  1. Update config/repositories.yaml
  2. Ensure the repository has a compatible CI/CD workflow
  3. Configure environment-specific secrets
  4. Test deployment through the dashboard

Adding New Environments

  1. Update config/environments.yaml
  2. Configure Kubernetes cluster access
  3. Set up approval workflows
  4. Update repository configurations

Customizing Workflows

The system supports various workflow patterns:

  • Standard: Build โ†’ Test โ†’ Deploy
  • GitOps: Build โ†’ Update manifests โ†’ ArgoCD sync
  • Blue/Green: Deploy to staging slot โ†’ Swap
  • Canary: Gradual traffic shifting

๐Ÿ”ง Troubleshooting

Common Issues

Deployment Stuck in "Pending"

  • Check GitHub Actions quota and runner availability
  • Verify repository permissions and secrets
  • Check environment approval requirements

Failed to Trigger Workflow

  • Ensure the target repository has the specified workflow file
  • Verify GitHub token permissions
  • Check repository access controls

Environment Not Available

  • Verify environment configuration in config/environments.yaml
  • Check repository-specific environment mappings
  • Ensure proper access permissions

Support

  • Documentation: Backstage TechDocs
  • Issues: Create issues in this repository
  • Slack: #platform-infra channel

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

โšก