简体   繁体   中英

Gitlab CI saving artifacts

What I am expecting:

I am trying to generate documentation in my CI script. I want that documentation to be stored in my repository.

I could be understanding the use of artifacts wrong but should this not do the trick?

building_documentation:
  stage: buildDoc
  only:
    - develop
  script:
    - npm run arkit
    - npm run doc
  artifacts:
    paths:
      - $CI_PROJECT_DIR/docs

The stage runs and completes without any errors. This is the output from the console (docker): 在此处输入图像描述

But after it runs, when I look in my repository there is still no docs folder there containing the documentation generated by npm run doc .

In case the information is needed:

  • All CI steps pass.

Artifact feature upload job artifacts created by Gitlab runner to the Gitlab server. Then, you can are download them as a single archive using the GitLab UI or the GitLab API.

Artifacts are not pushing back to your repository using artifacts . If you want to do this, you need to git add/commit and push back in your repository adding git commands in your .gitlab-ci.yml

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM