GitLab: How to open private job artifacts directly via browser

2.5k Views Asked by At

i'm running a pipeline in my GitLab project where automated ui tests are executed. After the tests has been finished it will generate a test report where also a .html file is generated to be able to view the test results in the browser. The generated files will be archived as artifact via the pipeline job.

.gitlab-ci.yml

artifacts:
    name: ${TESTREPORT_TITLE}
    when: always
    paths:
        - ${ARTIFACT_REPORT}
    reports:
        junit: ${ARTIFACT_REPORT}${TESTREPORT_TITLE}.html.junit.xml
    expire_in: 60 days

We have activated GitLab Pages to directly open .html files out of the artifact job archive. That only works for public projects. But in private project it give me following hint:

The source could not be displayed because it is stored as a job artifact. You can download it instead.

Is there some extra configuration missing?

Our GitLab Instance is self-hosted / On-Premise.

Thanks in advance for any help or advice!

1

There are 1 best solutions below

0
On

issue is already resolved by making some changes based on the documentation:

To open up (.html) artifacts in private projects:

To enforce mechanics of access control and disable public access of artifacts:

To set up the access rights to your own needs (i.e. if you want to serve .html artifacts of private projects to the public)

  • Go to your Project -> Settings -> General -> See in the section "Pages" under "Visibility, project features, permissions" your settings and adjust there