Reputation: 21
We have implemented a CI/CD pipeline to automatically build and deploy new releases onto a staging slot in our Azure App Service instance. We build and push new container images to our Azure Container Registry tagged with :latest
and then trigger the webhook to redeploy the staging slot. Hot-swapping this slot to production also works.
However, if we try out new features on staging which are not ready for production yet, then simply restarting the production slot will automatically load all :latest
images. This is less than ideal. Also reverting the hot-swap will not work, as now both slots are on :latest
.
Ideally, we would tag our docker images with build numbers, but I don't see a simple way to dynamically update the multi-container configuration (docker-compose.yml
) to use these build numbers. Our CI/CD pipeline currently runs on Bitbucket Pipeline, but we could also switch to Azure DevOps if required. Any hints on how to resolve this?
Upvotes: 1
Views: 822
Reputation: 21
Here's what I came up with so far, but ideally there's a simpler approach which does not need Service Principle access from the pipeline:
BITBUCKET_BUILD_NUMBER
with e.g. sedaz webapp config container set --multicontainer-config-file docker-compose.yml -s staging
(see here)Let me know if you can think of a simpler approach.
Upvotes: 1