Add access keyword in artifacts
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
- Now you would need a local runner setup to test this behaviour as you would need to run a pipeline for various scenarios.
- Head over to setup runner.
- Create or use an existing project locally to add the following content in it's
.gitlab-ci.yml
. - 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
- Set values for
access
as you want from the above list and see it work. - Check the error you get when you use
access
andpublic
keywords together at the same level.
Related to #428677 (closed)