Portal Community

The Three-Environment Promotion Pattern

1
Dev — Build and Test

Design and iterate on the app in the Dev tenant. Connect to Dev data sources and workflows. When the release is ready, export the app bundle with a version label.

2
Staging — Integration Test

Import the bundle to the Staging tenant using Replace strategy. Connect Staging data sources. Run UAT and integration tests. Do not edit the app in Staging — any required changes go back to Dev and re-export.

3
Production — Deploy

Export the same bundle that passed Staging testing (or use the same file). Import to Production tenant using Replace strategy. Production gets the exact same app definition as Staging.

Environment-Specific Configuration

Some configuration is environment-specific and cannot be in the bundle. After each import, configure these manually in the target environment:

Config itemWhere to configure after import
Data source endpoint URLsApp Studio App Settings → Data Sources
Credential IDs for authenticated data sourcesApp Studio App Settings → Credentials
Workflow IDs (if they differ per environment)Widget action configs in the designer
Allowed roles (if tenant roles differ per environment)App Studio App Settings → Security

Keeping Dev, Staging, and Prod Aligned

Key rules to maintain environment integrity:

CI/CD Integration

Use the Export/Import API to automate promotion in your deployment pipeline:

# Example: GitHub Actions deployment step
- name: Promote App to Production
  run: |
    curl -X POST \
      -H "Authorization: Bearer ${{ secrets.PROD_API_TOKEN }}" \
      -H "Content-Type: application/json" \
      -d "{ \"bundle\": $(cat crm-app-1.4.2.appstudio.json), \"conflictStrategy\": \"replace\" }" \
      https://api.bizfirstai.com/tenants/acme-prod/apps/import