Create sub directory in `pages` job

Hello,

I’d like to publish my coverage reports (as codecov for gitlab seems to be busted) . I’d like to publish it at least for any merge requests where two people can debate about what should be covered. I was thinking something like this:

pages:
  stage: verify
  dependencies:
    - test
  script:
    - mkdir -p public/$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME 
    - mv coverage/ public/$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME 
  artifacts:
    paths:
      - public/
      - public/$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME 
    expire_in: "30 days"

Is this possible?

Anyone?

This should be possible, but I think you need to download the old pages from gitlab-pages before publishing it all again with your job. Otherwise the old subfolders are removed (I think)

1 Like

Thanks for the response! How do I download ?

I’d use wget or curl and download directly from the pages url