Skip to content

Allow specifying a default link for exposed artifacts when paths link to directories

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

Problem to solve

The artifacts.expose_as is a great way to expose e.g. Code coverage. But when generating code coverage with Istanbul.js as HTML files, multiple files will be emitted and not a single file. This means that artifacts browser will always be opened, even if we know that we might always want coverage/index.html to be opened.

Intended users

User experience goal

The user should be able to open the correct view with one click, instead of first opening artifact browser => correct folder => index.html.

Proposal

I suggest making the opened file for artifacts with directories configurable. This can be done with an extended YAML syntax for .gitlab-ci.yml:

test:
  artifacts:
    expose_as:
      name: Coverage report
      entry_path: coverage/index.html
    paths:
      - coverage/

The expose_as property could accept either a string (which works as it does now), or a an object where the name and default file to open can be configured.

Further details

Permissions and Security

Documentation

Availability & Testing

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

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by 🤖 GitLab Bot 🤖