ZuploZuplo
LoginSign Up
  • Documentation
  • API Reference
Introduction
Getting Started
    Develop using the Portal
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingMCP - Quick start
    Develop Locally
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth
Concepts
Development
Policies
Handlers
API Keys
MCP Server
MCP Gateway
AI Gateway
Developer Portal
Monetization
Deploying & Source Control
    Overview
    GitHub
    GitLab
      SetupBasic DeploymentDeploy and TestMR Preview EnvironmentsLocal Testing in CITag-Based ReleasesMulti-Stage Deployment
    Bitbucket
    Azure DevOps
    CircleCI
    Custom CI/CDMonorepo DeploymentRename/Move Project
Observability
Networking & Infrastructure
Account Management
Programming API
Build with AI
Zuplo CLI
Migration Guides
Platform LimitsSecuritySupportTrust & ComplianceChangelog
powered by Zudoku
GitLab

GitLab CI/CD: Multi-Stage Deployment

Deploy to staging, test, then promote to production with approval.

.gitlab-ci.yml
image: node:20 stages: - deploy-staging - test - deploy-production deploy-staging: stage: deploy-staging script: - npm install - npx zuplo deploy --api-key "$ZUPLO_API_KEY" --environment staging 2>&1 | tee ./DEPLOYMENT_STDOUT - echo "STAGING_URL=$(grep -oP 'Deployed to \K(https://[^ ]+)' ./DEPLOYMENT_STDOUT)" >> staging.env artifacts: reports: dotenv: staging.env only: - main test-staging: stage: test needs: - deploy-staging script: - npm install - npx zuplo test --endpoint "$STAGING_URL" only: - main deploy-production: stage: deploy-production needs: - test-staging script: - npm install - npx zuplo deploy --api-key "$ZUPLO_API_KEY" --environment production only: - main when: manual environment: name: production

Setting Up Approval

The when: manual setting requires someone to click "Play" in the GitLab UI to trigger production deployment.

For more control, use Protected Environments:

  1. Go to Settings > CI/CD > Protected environments
  2. Add production as a protected environment
  3. Specify which users or groups can deploy
Edit this page
Last modified on December 3, 2025
Tag-Based ReleasesBitbucket
On this page
  • Setting Up Approval
YAML