Lesson
5.5 Deploy code
After establishing your repository connection and understanding version control workflows, it's time to bring your data pipelines to life in production. The deployment process in Mage Pro transforms your committed code from a GitHub repository into running pipelines that process real data and deliver business value.
Understanding the deployment process
Deployment is the critical bridge between development and production. When you deploy code in Mage Pro, you're taking the pipelines you've built, tested, and committed to version control and activating them in a live environment where they can process actual data and generate insights for your organization.
Think of deployment like publishing a book. You can write, edit, and review your manuscript (development), but until you publish it (deploy), readers can't access your work. Similarly, your data pipelines remain dormant code until deployment brings them to life.
Step-by-step deployment workflow
Step 1: Prepare your code for deployment
Before deploying, ensure your code has been properly merged through your Git workflow:
Complete your feature development in a feature branch
Test thoroughly in your development environment
Create a pull request to merge into your main/production branch
Review and merge the pull request in GitHub
Verify the merge was successful in your GitHub repository
Step 2: Navigate to the Deployment interface
Once your pull request is merged:
Return to Mage Pro and navigate to the deployments section
Click "Deployments" (highlighted in green) at the top of the interface
Locate your recently merged changes in the deployment dashboard
The deployment interface shows you a clear view of what's ready to deploy, including commit messages, timestamps, and the author of changes.
Step 3: Execute the deployment
With your code ready and the interface open:
Click the "Deploy" button next to your target deployment
Monitor the deployment progress through the status indicators
Verify successful deployment by checking that your pipelines are now active
The deployment process typically takes a few minutes, depending on the complexity of your pipelines and the size of your changes.
Deployment safety features
Rollback capabilities
One of Mage Pro's most valuable features is the ability to quickly revert problematic deployments:
When to use rollback:
Production pipelines are failing after deployment
Data quality issues emerge from new code
Performance degradation occurs
Critical bugs are discovered in production
How to rollback:
Navigate to the deployments interface
Locate the previous stable version in the deployment history
Click the "Rollback" button next to the desired version
Confirm the rollback action when prompted
Monitor the rollback process to ensure successful reversion
Deployment best practices
Deploy during low-traffic periods: Schedule deployments during times when your data pipelines have minimal impact on business operations.
Monitor post-deployment: Always watch your pipelines for the first few execution cycles after deployment to catch any issues early.
Communicate with your team: Inform stakeholders about deployment schedules, especially for critical pipeline changes.
Test in staging first: Use your staging environment to validate deployments before pushing to production.