Gitlab 中构建失败的工件

问题描述 投票:0回答:3

我想知道如何在gitlab持续集成中为失败的构建生成工件,以查看构建生成的html报告。

我尝试过这样的:

 artifacts:
    when: on_failure
      paths:
        - SmokeTestResults/
        - package.json

但不幸的是它不起作用。我使用的是 Gitlab 8.11.4 社区版。

gitlab gitlab-ci gitlab-ci-runner
3个回答
83
投票

使用

when: on_failure
将仅在失败时上传工件。 要始终上传工件

失败,请使用when: always

https://docs.gitlab.com/ce/ci/yaml/index.html#artifactswhen


31
投票

artifacts: when: on_failure paths: - SmokeTestResults/ - package.json



0
投票

artifacts: when: always paths: - SmokeTestResults/ - package.json

© www.soinside.com 2019 - 2024. All rights reserved.