Skip to content

Add archiver staging directory option to runner helper

Arran Walker requested to merge 6610-artifact-staging-dir into main

What does this MR do?

Adds an ARCHIVER_STAGING_DIR option to the Runner helper. For now, this is only used for Artifacts, but is generically named, as an archiver staging directory may be useful in other archiving contexts where files need to first be staged (before extraction, or upload etc.)

Why was this MR needed?

The workaround for #6610 (closed) was to override TMPDIR. This adds an option specifically for archiving, where you would expect larger files.

What's the best way to test this MR?

The shell executor with job below is a good way to test that the ARCHIVER_STAGING_DIR is being passed through, as it will fail, due to "/dev/null" being an invalid directory. This mimics the test added in Go also.

image: busybox:latest

stages:
  - upload
  - download

upload:
  stage: upload
  script:
    - echo "hi" > file
  artifacts:
    paths:
      - file

download:
  stage: download
  variables:
    ARCHIVER_STAGING_DIR: "/dev/null"
  script:
    - cat file

What are the relevant issue numbers?

Closes #6610 (closed)

Merge request reports