Skip to content
← Back to YouBlog

Published article

DevOps pipeline order of operations: commit to deploy

Drafted with AI from the video "DevOps Pipeline: Order of Operations", then reviewed and published by Gustavo Miranda.

The devops pipeline order of operations that a commit follows on a roadmap is the reverse of the order you should build it in. Git push, CI, image build, registry, deploy, infrastructure, DNS, monitoring and secrets happen left to right, but cloud trust and infrastructure must exist before the first push can ship anything.

What is the devops pipeline order of operations?

The devops pipeline order of operations is the nine-stage sequence a single commit follows on its way to production: Git push, CI, build, registry, deploy, infrastructure as code, DNS and load balancing, monitoring, and secrets. Each stage receives a specific artifact and produces a different one, and the label that matters shifts once, from commit ID to image digest.

The learning order and the build order differ. A developer learns Git before Docker because a registry makes no sense before you know what an image is. When wiring a real pipeline, the back of that list moves forward: cloud trust lets CI reach a provider at all, and infrastructure gives a deploy somewhere to land.

A commit ID identifies one version of your repository history. An image digest identifies one immutable set of image bytes. Pods, service IP addresses and metric series are all produced downstream of whichever digest the cluster was told to run.

The table below summarises the handoffs for a single commit moving through all nine stages.

Stage by stage: what each DevOps pipeline stage hands to the next

Every stage produces a named artifact that the next stage depends on, and that artifact is the only thing worth tracking across the boundary. The stages run left to right for a commit, even though the infrastructure the early stages lean on has to be provisioned before any of them can work.

Use the table as a checklist of the handoff at each border crossing.

StageReceivesProduces
Git pushLocal commits and a pack fileUpdated branch ref
CIRef update eventCheckout of the commit on a fresh runner
BuildWorking tree and DockerfileImage manifest with a sha256 digest
RegistryLayers and manifestPullable image by digest
DeployImage referenceReplicaSet and running pods
Infrastructure as codeConfiguration filesRegistry, cluster, load balancer
DNS and load balancerTarget instancesA record with a TTL, plus health-checked traffic
MonitoringInstrumented targetsTime series and alerts
SecretsWorkflow identityShort-lived credential

Git push: refs plus a pack file

The client sends one ref-update line per branch, with the server's current commit ID, the commit ID it wants the server to hold, and the branch name. The pack file that follows contains only the objects the server lacks. The server answers with unpack status and then ok or ng per branch, and a non-fast-forward push comes back as ng.

On a plain Git server, server-side hooks decide what happens next. A pre-receive hook can reject every update by exiting non-zero, an update hook runs once per branch, and a post-receive hook runs after the references have moved. Hosted CI such as GitHub Actions plays the same role by reacting to the update event.

CI: a fresh runner and one environment variable

A workflow run starts for every workflow whose trigger matches the event, so a single push can wake several workflows. The commit arrives on the runner as an environment variable, GH_SHA, because the runner is a clean virtual machine with nothing on it. The commit ID tells it which version of the code to fetch. GitHub's documentation for hosted runners lists the resource class for ubuntu-latest on public repositories as four vCPUs and 16 GB of RAM.

Build: the commit ID comes off, the digest goes on

Each Dockerfile instruction becomes a Docker image layer, and a change to one layer invalidates every layer after it, so instruction order controls build speed. The output is a manifest: a config object plus an ordered list of layers, each named by a SHA-256 digest. The manifest itself receives a digest, and because it names every layer digest, that single value pins the whole image.

Docker's documentation states that tags such as latest can be reused or changed, while a digest is immutable and pulls identical bytes each time. The bag therefore carries the digest, never the tag. A digest cannot be peeled off and stuck on a different image, which is exactly why it survives the rest of the pipeline.

Registry: blobs first, manifest last

The OCI distribution specification puts blobs on the wire before the manifest, while a pull fetches the manifest and then each blob by digest. A manifest that named layers the registry did not yet hold would point at nothing, which is why the order is fixed. The spec also allows a HEAD request to check whether a blob exists, letting a client skip layers the registry already has.

Deploy: ReplicaSets and readiness probes

A Kubernetes Deployment declares how many pods should run, and the image reference sits in the pod template. Changing that template creates a new ReplicaSet, which scales up while the old one scales down. maxSurge caps how many extra pods may be added above the desired count and maxUnavailable caps how many may be missing during the swap. Both default to 25%, and rolling back to an earlier revision is supported.

A Service provides a stable address for a group of pods. Each pod answers a readiness probe, and a failing pod has its IP address removed from every matching Service, so traffic follows readiness rather than container start.

Infrastructure as code: the plan is the gap

A tool such as OpenTofu, the open source fork of Terraform 1.5, keeps state that maps configuration to real objects, records dependencies and caches attribute values. A plan reads the current remote object state and compares configuration with prior state, then proposes the actions that would make reality match. The plan is the gap between configuration, state and reality written as a list of changes.

Why the last DevOps pipeline stage has to be built first

Secrets and cloud trust appear last on the map but must exist before the first workflow run, because CI cannot reach a cloud provider without a credential or a pre-configured trust relationship. The order a commit meets the tools hides this dependency, and it changes what you provision first.

GitHub Actions OIDC lets a workflow request a token scoped to a single job that expires afterward. The cloud provider checks the token's subject and other claims against conditions set up in advance. That avoids storing long-lived cloud credentials in repository secrets, but the trust has to exist before the first run reaches anything.

Secrets also leak in less obvious places. Docker build arguments and environment values can persist in the final image, so Docker's documentation points to secret mounts that exist only for the duration of the build instruction. Kubernetes Secrets are stored unencrypted by default in etcd, the cluster's data store, where anyone with API access or etcd access can read them. Encryption at rest and role-based access control are the documented first steps.

GitGuardian, a secret-scanning vendor, reported 28.65 million new hard-coded secrets in public GitHub commits during 2025, a 34% rise, and found 64% of valid secrets from 2022 still active in January 2026 in its State of Secrets Sprawl report. Those figures come from the vendor's own scanning of public commits and its self-scanning products, so treat them as vendor-reported evidence rather than independent measurement.

How DNS TTL and load balancer health checks control cutover speed

DNS TTL and load balancer health-check settings set how long stale answers and dead targets can persist, so they determine how fast a cutover actually takes effect. Neither number appears in a typical tool roadmap, and both are configured before the release that needs them.

RFC 1035 defines a TTL as the time a record may be cached before the source is consulted again. Amazon Route 53 documentation gives 172,800 seconds, two days, as an example of a long TTL. That reduces lookups and cost but stretches the window in which an old IP address is still served. The same docs suggest starting with a short TTL such as 300 seconds for a domain already in use, then raising it after the new settings are confirmed.

An Application Load Balancer checks each target every 30 seconds with a 5-second timeout by default. It marks a target unhealthy after two consecutive failures and healthy again after five consecutive successes. At those defaults, two checks work out to roughly 60 seconds to remove a dead target and five checks to about 150 seconds to restore a recovering one, and AWS describes the interval as approximate, so real timing varies.

Two behaviours matter during a bad release. If every target is unhealthy, the balancer fails open and sends traffic to all of them. When a target is deregistered, the balancer waits 300 seconds by default so in-flight requests can finish.

Why Prometheus pulls instead of waiting for reports

Prometheus scrapes instrumented targets over HTTP on an interval and stores each sample as a time series with a timestamp and labels, rather than waiting for services to report in. Its default scrape interval is one minute with a 10-second timeout, so new samples land about a minute apart.

Recording and alerting rules run over that data. They can create new series or fire alerts, which route to Alertmanager for grouping, silencing and routing.

Each layer keeps its own clock. A DNS answer can stay cached for the length of the TTL, a balancer needs about a minute to drop a dead target, and a graph refreshes within the scrape interval. These windows apply to different events and do not sum to a single number, but each is a period in which the old state is still served or a problem has not yet reached a dashboard.

That is the argument for monitoring before the first real deploy rather than after it, since the deploy is precisely when you need to see whether the new digest is serving traffic.

A build order that works for a first release

Build the back of the list first: provision cloud trust and infrastructure, then add monitoring as a safety net, then run the pipeline stages that push, build, publish and deploy on top. Add a short DNS TTL before switching any name that already has users.

  1. Configure an OIDC trust or a scoped credential so CI can reach the cloud provider.
  2. Provision the registry, cluster and load balancer with infrastructure as code.
  3. Add monitoring and alerting so the first real deploy is observable.
  4. Create the pipeline that pushes, builds, publishes by digest and deploys.
  5. Lower the DNS TTL before any cutover on a live name, then raise it once the change is confirmed.

Expect the middle of that order to shift with your setup. A brand-new service with no users can point straight at a load balancer address and skip the TTL step entirely.

This map covers one path. GitOps controllers such as Argo CD and Flux reconcile cluster state from a repository rather than from a CI job, and canary or blue-green rollouts change how traffic shifts. The test stage sits between CI and build. None of those are included in the nine stages, and each changes the handoffs in its own way.

If you already run a pipeline, inspect three things in order: whether CI uses short-lived tokens, whether the TTL is short before any planned cutover, and whether Kubernetes Secrets are encrypted at rest.

Roadmap order versus pipeline order

A roadmap teaches tools in the order a commit meets them, and that order is a reasonable way to learn each tool, but it is the wrong order to build a working pipeline. The devops pipeline order of operations stays left to right for a commit while the setup order runs close to backward.

The distinction is between knowing what a tool is and knowing what it accepts and returns. Naming Git, CI, Docker, Kubernetes and Terraform does not tell you that a manifest must arrive at a registry after its blobs, or that a digest is the only reference that survives from build to pod.

A short exercise makes the difference concrete. Draw nine boxes, write the input and output artifact in each, then mark every box that must already exist before the first one can succeed. The back of the list fills in quickly.

Frequently asked questions

  • What is the devops pipeline order of operations? It is the order in which a commit meets each pipeline stage: Git push, CI, build, registry, deploy, infrastructure as code, DNS and load balancing, monitoring, and secrets. Each stage hands a named artifact to the next, and the artifact changes from a commit ID to an image digest at the build.
  • Should secrets be configured first or last in a DevOps pipeline? Configure them first. A CI job cannot reach a cloud provider without an OIDC trust or a scoped credential that already exists, even though secrets appear last on the stage map. Long-lived cloud credentials in repository secrets are the pattern OIDC is designed to replace.
  • Why use an image digest instead of a tag? A digest is immutable and pulls identical bytes, while a tag can be reassigned to a different image. Pinning the digest in the Kubernetes pod template guarantees the cluster runs exactly what CI built and the registry stored.
  • Why does the registry receive layers before the manifest? A manifest names the layer digests it depends on, so storing it first would create a pointer to blobs that do not exist. Pushing blobs first and the manifest last keeps every reference resolvable at all times.
  • How long does a DNS cutover take with a long TTL? Up to the TTL, because resolvers and clients may keep serving the old record until it expires. A long default such as two days means some clients can see stale answers for that long, which is why short TTLs are set before a planned move.
  • Why does an overloaded load balancer still send traffic to unhealthy targets? AWS Application Load Balancer fails open when every target fails its health check and sends traffic to all of them. The balancer stops listening entirely only when no target is healthy at all and the fail-open behaviour does not apply.
  • What does a Terraform or OpenTofu plan actually compute? A plan reads the current state of remote objects and compares your configuration with prior state, then lists the actions that would reconcile them. The plan is the gap between configuration, state and reality.
  • Is monitoring required before the first deploy? It is a safety net rather than a hard dependency, but a deploy without monitoring means you cannot see whether the new digest serves traffic correctly. Adding it before the first real release shortens the time between a bad rollout and a diagnosis.
  • Do these nine stages cover a GitOps setup? No. GitOps controllers such as Argo CD and Flux change how cluster state is reconciled, and canary or blue-green strategies change how traffic shifts. The nine stages describe a CI-driven path and leave those patterns outside the map.

From pipeline handoffs to written knowledge

The value in this walkthrough is not the tool list, it is the handoff at each stage. Anyone can name nine tools; knowing that the registry stores blobs before the manifest changes how you debug a failed push, and a map of those handoffs is what lets you redraw the pipeline from memory.

That kind of explanation is often already recorded somewhere in a video: a walkthrough, a postmortem review, an internal training session, or a lesson taught to a teammate. Getting it out of that recording and into a form people can search, quote and revisit is the slow part. YouBlog takes a YouTube URL, transcribes the video and generates an article draft, so the explanation you already gave once can be edited and published instead of retold. If your team records Dev doido style deep dives or Crazystack TypeScript sessions, Crazystack shows how technical content in Portuguese can reach a wider audience.

Turn your walkthrough into an article

If your pipeline explanation already exists as a recorded walkthrough, the transcription step is what turns it into something citable. Paste the video link, review the generated draft against your own diagrams, and correct any handoff that drifted during the retelling.

YouBlog

Source video

YouTube thumbnail: DevOps Pipeline: Order of Operations

Source video

DevOps Pipeline: Order of Operations

Create from this video

This article was created automatically from a new video.

Automate my channel

Turn your YouTube videos into articles

Built for creators with a backlog and no editor on staff. This page started as a video. YouBlog drafts from the transcript, you review every word, then publish on a first-party /p/{slug} page. Nothing goes live until you publish it.

Turn your videos into articles

Published with YouBlog