gpt4 book ai didi

gitlab 运行器捕获错误 : no matching files

转载 作者:行者123 更新时间:2023-12-05 06:33:47 24 4
gpt4 key购买 nike

如果没有找到匹配的文件或批处理文件出现这样的错误,是否有办法捕获错误?

...
Rebuild complete.
Syntaxerror.
Syntaxerror.
Syntaxerror.
Uploading artifacts...
WARNING: Ticket/Ticket_111b: no matching files
WARNING: Failed to load system CertPool: crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok id=622 responseStatus=201 Created token=xxxxxx
Job succeeded

结果显示作业已成功执行。 gitlab-runner 如何知道批处理文件中的错误或没有匹配的文件警告?

gitlab YAML 文件:

before_script:
- xcopy /y /s "C:/Bauen" "%CI_PROJECT_DIR%"


stages:
- build
- deploy





build:
stage: build
script:
- build.cmd
artifacts:
expire_in: 1 week
name: "%CI_COMMIT_REF_NAME%"
paths:
- "%CI_COMMIT_REF_NAME%"
only:
- tags
except:
- master


build_master:
stage: build
script:
- buildm.cmd
artifacts:
expire_in: 1 week
name: "%CI_COMMIT_REF_NAME%"
paths:
- "%CI_COMMIT_REF_NAME%"
only:
- master

deploy:
stage: deploy
script:
- ./upload.cmd
dependencies:
- build_master
only:
- master

GitLab Runner 在 Windows 机器上运行。

最佳答案

我不确定是否完全理解你想要什么。

如果某些文件不存在,是否要停止作业?

如果是这样,您只需在脚本部分添加一行,如果您的文件不存在,该行将失败。例如,在 bash 中:

script:
- ls this_file_must_exists

关于gitlab 运行器捕获错误 : no matching files,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50562830/

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