Skip to content

Add access keyword in artifacts

Rajendra Kadam requested to merge 428677-artifact-download into master

What does this MR do and why?

This MR adds a new keyword to the Pipeline configuration for artifacts. The new keyword is called 🥁 access.

access can have 3 possible values -

  • all default
  • developer
  • none

Note: Existing keyword public and access cannot be used together.

When set to all everyone can see the artifact. Logged-in or non-logged-in users too if the project is public.

When set to developer only members can access the artifact, even if the project is public.

When set to none no one can access the artifacts, even the members included.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Check this video for a demo - https://www.youtube.com/watch?v=1Cak2NUiH1A

Note to video: When I recorded the video the values were public, member and none. Since then they are changed to all, developer and none as per the suggestion at !145206 (comment 1786815181)

How to set up and validate locally

  1. Now you would need a local runner setup to test this behaviour as you would need to run a pipeline for various scenarios.
  2. Head over to setup runner.
  3. Create or use an existing project locally to add the following content in it's .gitlab-ci.yml.
  4. Create a sample CI yml with the following content:
rspec:
  image: ruby:3.0.4
  script:
    - bundle install
    - rspec --format RspecJunitFormatter --out rspec.xml
  artifacts:
    access: none
    reports:
      junit: rspec.xml
  1. Set values for access as you want from the above list and see it work.
  2. Check the error you get when you use access and public keywords together at the same level.

Screenshot_2024-02-23_at_10.15.47_AM

Related to #428677 (closed)

Edited by Rajendra Kadam

Merge request reports