This demo was derived from several best practices and guidelines on API Management deployment process, Git branching/merging strategy and release automation.
- Azure API Management DevOps Resource Kit
- Trunk Based Development
- Release Flow: Microsoft's Branching Strategy
- Clone this repo locally
- Clone the APIM DevOps Resource Kit locally as well
- Checkout a new topic branch called
/users/[yourname]/[changesetname]
- Modify the
.env
file to to the full path of the/src/APIM_ARMTemplate/apimtemplate
folder of the DevOps Kit repo - Modify the
.env
file to include your dev and production instances of APIM and the corresponding Resource Group (this assumes they are both in 1 RG) - Run the following command from a bash window:
export $(cat .env)
to import the environment variables
- Make an API or policy change to the Dev instance of APIM
- Checkout a new topic branch called
/users/[yourname]/[changesetname]
- Run the following command from a bash window:
bash ./extractConfig.sh
- The
[prodinstancename]-apis-template.json
file should be updated with the included changes - Commit and push your changes to a new remote branch
- Submit a Pull Request to merge your changes to master
- Have PR approved and merged (delete topic branch)
- Repeat with additional changes (if necessary)
- When ready to deploy to Production, create a new branch called
/releases/[releasename]
from master - This will automatically trigger the release process