Skip to content
Latchkey

What Is a Deployment Job? Shipping Code From a Pipeline

A deployment job is the pipeline job that takes a built artifact and releases it to a target environment such as staging or production.

Build and test jobs prepare your code; a deployment job actually ships it. It is the part of the pipeline that pushes a container image, copies files to a server, updates a cloud service, or applies infrastructure changes. Because it changes the running system, a deployment job carries more risk and usually has extra guardrails around it.

What a deployment job does

It takes the artifact produced earlier in the pipeline and applies it to an environment: pushing an image to a registry and rolling it out, running database migrations, or invoking a deploy tool. The target is usually named (staging, production) so the pipeline can track what is where.

How deploy jobs differ from build jobs

  • They target a named environment, not just a workspace.
  • They often require approvals or protected-environment rules.
  • They are frequently restricted to specific branches or tags.
  • They may run one at a time to avoid concurrent deploys.

A quick example

A deploy job might run kubectl set image deployment/app app=registry/app:${SHA} to roll out a new container, or call a platform CLI to release the latest build. The ${SHA} ties the deploy to the exact commit that was built and tested.

Guardrails on deploys

Because a deploy changes production, teams add approvals, environment protection, and concurrency limits. A rollback path is essential: if the deploy job ships a bad build, a rollback job should be able to put the previous version back quickly.

Deploy jobs and reliability

A deploy that fails halfway is worse than one that never started. Reliable deploy jobs are idempotent and verifiable, with a post-deployment check confirming the new version is healthy. Stable runners reduce mid-deploy interruptions; managed runners (Latchkey) retry transient infrastructure blips so a deploy is less likely to fail for reasons unrelated to your code.

Key takeaways

  • A deployment job releases a built artifact to a named environment.
  • It carries more risk than build jobs, so it gets approvals and protection.
  • Pair it with a rollback path and a post-deployment health check.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →