artifacts – when

The when key can have one of three different values and controls under what circumstances artifacts are uploaded:

  • on_success: Only upload artifacts when the job is successful (default).
  • on_failure: Only upload artifacts when the job fails. This is useful if you want to examine failed builds.
  • always: Upload artifacts, regardless of whether the job succeeds or not.

Get GitLab Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.