Skip to content

Artifacts path do not honor job variable after v15.1.1

Summary

Using job variable in gitlab.yml artifacts paths do not work anymore after upgrade to gitlab-runner 15.1.1. It worked fine with 15.1.0.

Steps to reproduce

.gitlab-ci.yml
.pwa_common: &pwa_common
  cache:
    key: "$JOB_APP_DIRECTORY-cache-pwa"
    paths:
      - $JOB_APP_DIRECTORY/node_modules
  artifacts:
    name: "$JOB_APP_DIRECTORY-$CI_COMMIT_REF_NAME"
    when: always
    paths:
      - $JOB_APP_DIRECTORY/coverage
    expire_in: 1 week
    reports:
      junit: "$JOB_APP_DIRECTORY/tests/xunit.xml"

"[PWA] Ember tests":
  <<: *pwa_common
  stage: tests
  variables:
    JOB_APP_DIRECTORY: "pwa"
  script:
    - JOBS=1 COVERAGE=true yarn run ember test

Actual behavior

The artifact upload task do not find the files.

Uploading artifacts for successful job 00:01
Uploading artifacts...
WARNING: $JOB_APP_DIRECTORY/coverage: no matching files. Ensure that the artifact path is relative to the working directory 
ERROR: No files to upload                          
Uploading artifacts...
WARNING: $JOB_APP_DIRECTORY/tests/xunit.xml: no matching files. Ensure that the artifact path is relative to the working directory 
ERROR: No files to upload                          

Expected behavior

Uploading artifacts for successful job 00:06
Uploading artifacts...
pwa/coverage: found 905 matching files and directories 
Uploading artifacts as "archive" to coordinator... 201 Created  id=742880 responseStatus=201 Created token=xxx
Uploading artifacts...
pwa/tests/xunit.xml: found 1 matching files and directories 
Uploading artifacts as "junit" to coordinator... 201 Created  id=742880 responseStatus=201 Created token=xxx

Status Update as of June 30 13:53 UTC (6:53 AM Pacific Time)

Use version 15.1.0. This regression only impacts 15.1.1, 15.0.1, and 14.10.1

The problematic binaries have been pulled. Reinstalling runner via the latest link for a binary (which is likely what was done if you encountered this) should now work and will point to 15.1.0.

Installing via package managers (eg: apt install gitlab-runner) still requires manual version pinning but we're working on that.

This should be fixed now. There's a bit of clean up we're still doing to wrap some things up so I'll keep monitoring here. But as of now the 15.1.1 packages have all been removed from anywhere we publish them, latest points at 15.1.0. The 14.10.2 and 15.0.1 packages have also been removed for anyone who went down that path.

Current supported and recommended versions are thus 15.1.0 (aka: latest), 15.0.0, and 14.10.1.

There were also some problems accessing 14.10.1 those packages have all been restored.

Edited by Elliot Rushton