Microsoft Azure Learning Journey

From Commit to Release: CI/CD Fundamentals for Azure

A reliable pipeline turns reviewed source into a tested, traceable release—not an unattended production password.

7 min read · 1364 words
Microsoft AzureCI/CDGitHub ActionsAzure DevOpsDevOps
From Commit to Release: CI/CD Fundamentals for Azure cover image

A small API change can pass local testing and still fail in production because the image, configuration, permissions, or deployment steps differ. Continuous integration and continuous delivery make those steps visible and repeatable. They do not make a release safe by themselves: teams still need trustworthy inputs, controlled identities, health checks, and a way back.

What you’ll learn

Prerequisites

The problem we’re solving

An engineer tests code on a laptop, another person rebuilds the container, and an operator copies a secret into a deployment command. The production artifact may not be the one that passed tests, and nobody can prove which source revision produced it. Manual repetition also creates permission sprawl: a pipeline that only needs to publish an image can end up with subscription-wide Contributor access.

CI/CD addresses these risks by encoding the path from reviewed change to running service. A pipeline coordinates tools; it does not replace code review, Azure RBAC, workload identity federation, or operational ownership.

Understanding the delivery loop

Continuous integration (CI) validates changes frequently: compile, lint, test, scan, and package. A failed check blocks later stages. Continuous delivery keeps a verified release ready for controlled deployment, usually with an approval or a deliberate promotion. Continuous deployment automatically releases every change that passes the required policy. These are related practices, not synonyms.

Reviewed commit
    |
    v
Fast checks --> build once --> immutable artifact + provenance
                                  |
                                  v
                         development environment
                                  |
                         health and policy gates
                                  |
                         approval / promotion
                                  v
                            production
                                  |
                     metrics, alerts, rollback

The pipeline should build an artifact once and promote the same digest through environments. Rebuilding the same commit separately for production can produce different bytes if dependencies, base images, or tool versions moved. A tag such as latest is a label, not an immutable artifact identity; an image digest identifies content.

A pipeline has trust boundaries

An Azure-hosted workload often uses a managed identity. A CI runner outside Azure typically uses OIDC workload identity federation. In both cases, authentication establishes an identity; Azure RBAC and each service’s data-plane permissions authorize actions.

Deployment strategy is part of the design

Azure Container Apps revisions can support traffic management, while App Service slots and deployment-ring patterns serve different hosting models. A deployment command succeeding is not a health check. Verify the app’s dependency path and user-facing behavior after traffic changes.

Separate infrastructure and application delivery

Infrastructure as code (IaC) describes resource configuration; application delivery publishes code or an image. They may share a pipeline, but they have different change rates, permissions, review needs, and rollback semantics. A bad app release may be reversible by restoring an earlier image. A destructive network or database migration may not be. Preview infrastructure changes and design data migrations for backward compatibility.

Hands-on: map a release before automating it

No Azure resources are created. Choose one small service and write down its current release steps:

  1. Name the source branch and the people allowed to approve a change.
  2. Record the test and build commands, including the expected success signal.
  3. Identify the artifact and how its exact digest is recorded.
  4. List the Azure resources the deployment changes and the role/scope required.
  5. Name a post-deployment health check, an owner, and a known-good rollback artifact.
  6. Mark which steps run for an untrusted pull request and which require a trusted branch or protected environment.

✅ Checkpoint: A teammate can explain the same release path from the commit ID to the deployed artifact and its recovery point.

Security, reliability, and cost

Give pull-request validation read-only repository permissions and no production credentials. Grant id-token: write only to a job that needs to request an OIDC token; that permission allows token issuance, not Azure resource access. Restrict the federated credential to the repository and environment or branch, protect the environment, and assign a narrowly scoped Azure role.

Keep logs useful but free of tokens, connection strings, sensitive command output, and Terraform state. Do not let a workflow from a fork or an unreviewed branch deploy to a privileged self-hosted runner. Use protected branches, dependency review, action pinning, and an owner for any exception.

Pipeline minutes, build compute, artifact retention, registry storage, network egress, deployment environments, and observability ingestion can cost money. A budget sends alerts; it does not cap charges. Retain release evidence according to policy and delete temporary lab infrastructure when finished.

Troubleshooting

Five-pillar readiness checklist

Cleanup

The exercise created no resources, so no Azure cleanup is required. If you created test environments, registries, runner groups, or artifacts while practicing, remove only lab-owned items and preserve production evidence and shared resources.

Key takeaways

Next: GitHub Actions and Azure.

Series navigation: Previous: Terraform application stack lab · Current: Phase 7, Part 1 · Next: GitHub Actions and Azure

References

Share this article

LinkedIn post draft