gpt4 book ai didi

gitlab - 如何禁用 gitlab runner 获取 git 存储库?

转载 作者:行者123 更新时间:2023-12-04 00:32:46 25 4
gpt4 key购买 nike

我的 .gitlab-ci.yml 中有这样的任务

deploy_all:
stage: deploy
script:
- cp project/target/jnlp/* html/jnlp/
tags:
- client:deploy-all

除了不必要的 git 存储库获取之外,一切正常。以下是运行者日志的摘录

Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
...
Fetching changes...
HEAD is now at 8dfc104 Update .gitlab-ci.yml
...
Job succeeded

这里不需要存储库,因为我只需要来自其他任务的工件。是否可以禁用此行为?

最佳答案

我找到了解决方案:

  • 将 gitlab 升级到 10.x 版本,手册在这里 https://docs.gitlab.com/runner/install/linux-repository.html
  • 在构建脚本中禁用 git checkout(通过添加变量)

    deploy_all:
    variables:
    GIT_STRATEGY: none
    GIT_CHECKOUT: "false"
    stage: deploy
    script:
    - cp project/target/jnlp/* html/jnlp/
    tags:
    - client:deploy-all

关于gitlab - 如何禁用 gitlab runner 获取 git 存储库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48577064/

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