Best Practice
However you configure deployment automation, weād recommend you unit test your rules, custom DB scripts, and hooks prior to deployment, and run some integration tests against your tenant post-deployment too. For more details regarding this, see the Quality Assurance guidance provided.- TheĀ Auth0 Deploy CLI toolingĀ provides you with an easy-to-use script that can help you integrate with your existing Continuous Integration/Continuous Deployment (CI/CD) pipeline.
- If you canāt integrate directly with, or for some reason you donāt have a CI/CD pipeline, then the Auth0Ā Source Control ExtensionsĀ can provide an easy-to-set-up basic automation process with very low maintenance.
Note that both the Deploy CLI Tool and source control extensions can cause destructive changes; manual changes made directly in the dashboard between automated deployments could be lost! For this reason, if either is used, thenĀ allĀ changes should be deployed from the source control subsystem referenced via the tooling and not made manually.
- UseĀ Tenant Specific Variables
- UseĀ keyword replacementĀ if using the Auth0 Deploy CLI tool
Tenant specific variables
Auth0 allows you to configure variables that are available from within customĀ extensibility; these can be thought of as environment variables for your Auth0 tenant. Rather than hard code references that change when moving code between development, test, and production environments, you can use a variable name that is configured in the tenant and referenced by the custom extensibility code. This makes it easier for the same custom code to function, without changes, in different tenants as the code can reference variables which will be populated with tenant-specific values at execution time:- For use of variables in Actions, see Write Your First Action to learn how to configure secrets in the editor
- For use of variables in Rules, see how toĀ configure values
- For use of variables in Hooks, see how to configureĀ secretsĀ in the editor
- For use of variables in Custom DB Scripts, see theĀ configuration parameters