This is the first project from my DevOps internship at CodeAlpha. The task was to build a CI/CD pipeline with Azure tools: Azure Pipelines for the automation, Azure Container Registry (ACR) to store the images, and Azure App Service to run the app.
I'm writing this down partly so I remember how I did it, and partly in case it helps someone else doing the same thing.
Repo: github.com/mikegbenga/CodeAlpha_AzureCICD
What the pipeline does
Every time I push to main :
The tests run.
The app gets built into a Docker image.
The image is pushed to Azure Container Registry, tagged with the build number.
App Service is updated to run that exact image.
A smoke test calls the live /health endpoint until it reports the new build number.
If that never happens, the pipeline puts the previous image back.
Pull requests only run the tests and the build. Nothing gets pushed or deployed from a PR.
The app
I kept the app small on purpose, because the pipeline is the point here.…