needs & artifact download

Pass an artifact between jobs

Lesson 7 of 20 · 12 min · Module 3: Dependencies, coverage, and access

Different jobs use separate runners, so files do not automatically follow a dependency.

Start this lesson →

Free. No installation: you write and run the code in your browser, and it is checked automatically.

By the end, you’ll be able to…

  • Distinguish ordering from file transfer
  • Request the same artifact name

The idea

A workflow combines an event boundary, job dependencies, and ordered steps. Conditions and prerequisite outcomes determine which jobs can run.

01Distinguish ordering from file transfer

needs establishes when a job can run. It does not copy the previous runner filesystem. Use an explicit upload and download contract.

02Request the same artifact name

The download step must refer to site, matching the upload. The model rejects a download if no successful upload created that name.

03Keep a visible chain of evidence

The trace is test, build, artifact, deployment. Each link should be understandable when you investigate a failure later.

Your turn

Define test, build needing test and uploading site from dist/, then deploy needing build, downloading site, and running lab deploy notes:2.0 in staging.

What the checks look for

  • Build follows tests
  • Deploy follows build and downloads site
  • Records a staging deployment
Try it in the editor →

Take this with you

Express both the execution graph and the artifact flow.

Go a little further

Deliberately request a missing artifact and inspect the failed job.

Learn CI/CD & Release Engineering for free

20 short lessons with real code and instant checks.

See the whole course →