Skip to content

Artifact paths not properly parsed for expose_as

Summary

When artifacts to be exposed have path that are prefaced with "./", the artifacts are properly saved, but are not presented in MR.

Steps to reproduce

Create job where artifact paths are prefaced with "./".

Example Project

https://gitlab.com/aarongoldenthal/build-result-test

What is the current bug behavior?

Artifacts are not displayed in MR.

What is the expected correct behavior?

Artifacts should be presented in MR if artifacts are saved.

Relevant logs and/or screenshots

Given the following .gitlab-ci.yml:


job1:
  image: alpine:latest
  script:
    - echo foo > bar.txt
  artifacts:
    expose_as: 'Job 1 Report'
    paths: 
      - 'bar.txt'

job2:
  image: alpine:latest
  script:
    - echo foo > bar.txt
  artifacts:
    expose_as: 'Job 2 Report'
    paths: 
      - './bar.txt'

job3:
  image: alpine:latest
  script:
    - mkdir test
    - echo foo > test/bar.txt
  artifacts:
    expose_as: 'Job 3 Report'
    paths: 
      - 'test/'

job4:
  image: alpine:latest
  script:
    - mkdir test
    - echo foo > test/bar.txt
  artifacts:
    expose_as: 'Job 4 Report'
    paths: 
      - './test/'

The following artifacts are shown in the MR: image

Output of checks

This bug happens on GitLab.com

Edited by 🤖 GitLab Bot 🤖