gir*_*ffe 4 gitlab gitlab-ci gitlab-ci-runner
我在gitlab.com上使用共享运行器。此处的指南显示了有关工件的部分。但是当我运行我的工作并查看我的工作页面时,我只会看到以下内容:
没有关于工件的章节。
我该怎么办?
这是我的.gitlab-ci.yml:
image: node:7.9
stages:
- lint
- test
cache:
paths:
- node_modules/
before_script:
- npm install
- npm install -g grunt-cli
lint:
stage: lint
script:
- grunt lint
test:
stage: test
script:
- grunt
- grunt test
- grunt coveralls
artifacts:
paths:
- dist/project*.min.js*
Run Code Online (Sandbox Code Playgroud)
是否在失败的测试运行中创建了工件(例如,测试失败时的屏幕截图)?
如果是这样,则必须考虑到,Gitlab中的工件默认情况下仅是为成功测试而收集的。
您必须显式配置Gitlab CI以始终收集它们,例如
test:
...
artifacts:
when: always
paths:
- ...
Run Code Online (Sandbox Code Playgroud)
导致这种情况没有发生的原因可能有多种。该文件很可能从未生成,因此不能作为工件使用。您可以在输出本身中找到此问题的原因。
工件上传也始终记录在输出中,例如,这是我的构建中的一些调试:
Uploading artifacts...
storage/logs/lumen.log: found 1 matching files
Uploading artifacts to coordinator... ok id=1444 responseStatus=201 Created token=MHYPxxWu
Run Code Online (Sandbox Code Playgroud)
如果您没有看到类似的内容,很可能也记录了原因。
| 归档时间: |
|
| 查看次数: |
2306 次 |
| 最近记录: |