gpt4 book ai didi

deployment - 获取gitlab-ci中包含项目的具体目录

转载 作者:行者123 更新时间:2023-12-05 07:15:04 26 4
gpt4 key购买 nike

我的gitlab-ci.yaml:

stages:
- linter
- build
- deploy

include:
- project: 'infrastructure/ansible-repository'
ref: '1.0.0'
file: '/project-pipeline.yml'

project-pipeline.yml 中有一个 before_script: 我需要从 infrastructure/ansible-repository 访问一个目录。目前我 git clone 整个存储库。

我的问题:是否有目录或类似内容的包含?

最佳答案

您似乎正在寻找一种从远程存储库下载子目录的方法。根据您使用的存储库托管平台(例如 GitLab、GitHub、BitBucket 等)或者您与该目录的交互,有很多解决方案。
例如 git archive git clone --filtersvn 工具、wgetsparse checkout 等等,这些都是这篇有用的帖子中有描述:

How do I clone a subdirectory only of a Git repository?

关于deployment - 获取gitlab-ci中包含项目的具体目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59733937/

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