Skip to content

Consider automating transformation of screenshot paths for viewing with JUnit reports

The following discussion from !61515 (merged) should be addressed:

@mlapierre asked:

Alternatively, could we make GitLab automatically strip [the screenshot path]? That is, When GitLab parses the junit XML for ATTACHMENT, could it also determine the value of CI_BUILDS_DIR from the job and automatically remove the start?

@morefice replied:

That would be great indeed! I don't know how we can do that considering we don't have access to the value of CI_PROJECT_DIR when parsing our junit arfifact 🤷‍♂️

I see that job is one of the parameters, which seems to allow access to CI variables. Would that work?

To be clear, the aim is to make it possible to allow GitLab to display JUnit screenshots without needing users to alter the screenshot path.