Label multiple build artifacts in a job

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

Using the Show Arbitrary Build results allows users to create artifacts and expose them in GitLab for most anything including directories. One gap that's been exposed here is when users want to expose multiple files within a single job. This was proposed as a stretch goal of the initial implementation but was not completed.

Intended users

This feature will be used by developers creating artifacts that may link to each other, say an HTML file for a generated custom report that inks to other reports.

Further details

This was initially brought up in discussion on the initial issue with a use case from a user.

Proposal

Implement the labeling strategy proposed by @fabiopitino:

test:
  script:
    - echo 1
  artifacts:
    paths: 
      - path/to/*
      - another-file.html
      - tmp/*
    expose:
      - label: see file 1
        path: path/to/file.txt
      - label: see file 2
        path: path/to/file.html

Permissions and Security

Documentation

Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Links / references

Edited by 🤖 GitLab Bot 🤖