gpt4 book ai didi

gitlab - 在 gitlab-runner 的两个阶段之间停止清理

转载 作者:行者123 更新时间:2023-12-01 00:35:34 27 4
gpt4 key购买 nike

这是我的 .gitlab-ci.yml

stages:
- build
- unit_test_1
- unit_test_2
- perf_test

job1:
stage: build
script:
- bash build.sh
allow_failure: true

job2:
stage: unit_test_1
script:
- bash ./all/deployment/testframwork/unit_test_1.sh
allow_failure: true

这里 build.sh创建一个构建并将所有二进制文件存储在构建目录中。但是在 job1 完成后,这个目录正在删除。

但是我正在使用该目录来运行我的第二份工作。

我怎样才能做到这一点?

最佳答案

使用 build artifacts .您应该将 expire_in 与工件一起使用,这样构建目录就不会永远存储在您的 gitlab 中。要控制什么目录获取什么工件,请使用 dependencies

job1:
artifacts:
path: build
expire_in: 1 week
job2:
dependencies:
-job1
job3:
dependencies: []

关于gitlab - 在 gitlab-runner 的两个阶段之间停止清理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41504204/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com