We work on a master/main only branching strategy for the BE repositories. We open feature branches, deploy these branches to our test environment (development/staging) and once we confirm all is working, we merge into the main/master branch and release that to production.
When a PR is opened we trigger a build pipeline (Designer Gateway build). This build can be released to staging or production manually by creating a release and deploying it through the “Release” section under “Pipelines” on Azure Devops.
Production should only be released from the master branch once the feature branch is merged.
This specific release can be found here: https://dev.azure.com/HungerRush/ReventionMain/_release?_a=releases&view=mine&definitionId=186
When a PR is opened we trigger a build pipeline for only the development environment and it is automatically released. For staging and production the building and releasing can be done by the developer manually for any branch, but once the feature branch is merged into master, a build will be released to staging automatically.
Production should only be released from the master branch once the feature branch is merged.
Here the pipelines for each environment:
When a PR is opened we trigger a terraform plan pipeline for each environment. Then if the developer is happy with the changes, he/she can manually trigger terraform apply pipeline for each environment.
Here the pipelines for each environment: