Hi folks.
I have created a DevOps Pipeline which automates the deployment of Auth0 changes to the staging, dev and prod tenants. I have tested it by deploying the dev tenant config to staging but not done any deployments to dev or prod.
When it comes time to do the dev to prod tenant deployment, we have a potential problem: the dev tenant has 12 custom actions that prod tenant does not and my manager wants the pipeline to exclude those 12 extra actions when the DEV>PROD deployment happens so they stay in dev but don’t go into prod.
How do I accomplish this?
For context, here is the snippet of the pipeline doing the dev to prod deployment. I have censored the sensitive information as those are variables anyway:
-
stage: Deploy_Prod
displayName: ‘Deploy to Prod’
dependsOn: Deploy_Dev
jobs:
-
job: DeployProd
displayName: ‘Deploy Config to Auth0 Prod’
pool:
vmImage: ‘ubuntu-latest’
steps:
-
checkout: self
-
task: NodeTool@0
displayName: ‘Install Node.js’
inputs:
versionSource: ‘spec’
versionSpec: ‘22.x’
-
task: CmdLine@2
displayName: ‘Install Auth0 Deploy CLI via npm’
inputs:
script: ‘npm install -g auth0-deploy-cli’
-
script: |
a0deploy import --config_file=tenant/config-prod.json --input_file=tenant.yaml
displayName: ‘Deploy Config to Auth0 Prod’
workingDirectory: tenant
env:
AUTH0_DOMAIN: $(prod_domain)
AUTH0_CLIENT_ID: $(prod_client_id)
AUTH0_CLIENT_SECRET: $(prod_client_secret)
AUTH0_INCLUDED_ONLY: ‘[“actions”, “branding”, “emailTemplates”, “pages”]’
-
-