Only in Mage Pro.Try our fully managed solution to access this advanced feature.
Introduction
Mage Pro supports two CI/CD approaches to fit different organizational needs. Both follow the same core workflow: develop → staging → deploy to production using the Git terminal and the Mage Pro deployment application. This document clarifies the two primary CI/CD approaches available in Mage Pro:- CI/CD by cluster - Separate clusters for development, staging, and production
- CI/CD by workspace - Multiple workspaces within a single cluster
1. CI/CD by cluster
Setup: Separate clusters for each environment- Development cluster - Active development
- Staging cluster (optional) - Pre-production validation
- Production cluster - Live pipelines
2. CI/CD by workspace
Setup: Single cluster with multiple workspaces (see our workspaces guide for more details on configuring workspaces)- Development workspace - Active development
- Staging workspace (optional) - Pre-production validation
- Production workspace - Live pipelines
Git Branch Strategy & Environment Mapping
Recommended Branch Structure
Workflow Best Practices
Development:- Create feature branches from
development
:feature/new-pipeline
- Develop pipelines in feature branch and push changes to Github using the Git terminal (for more details on pushing code to Github see Mage Pro’s Git terminal doc)
- Merge
development
→staging
when ready for testing - Staging environment deploys from
staging
branch - Run full validation and integration tests
- Merge
staging
→main
after successful testing - Production environment deploys from
main
branch only - Use deployment application for controlled production releases (for more on Mage Pro’s deployment application see the version control guide)
Environment-Specific Configurations
Same Code, Different Targets: The same codebase connects to different systems using environment-specific configurations: Environment Variables & Secrets:- Each cluster/workspace maintains its own connection settings
DATABASE_URL
points to dev/staging/prod databasesAPI_KEYS
use environment-appropriate credentials
- Configure different data source connections per environment
- Use environment variables in pipeline io_config.yaml file:
{{ env_var('DATABASE_URL') }}
- or python interpolation in a block
os.environ.get('DB_USERNAME')
- or python interpolation in a block