variables: GIT_SUBMODULE_STRATEGY: recursive Run Code Online (Sandbox Code Playgroud) 触发了MASTER的CI管道。因此,在运行 MASTER 的 CI 时,不会应用 SLAVE 项目中所做的任何更改小智 0 您需要添加GIT_SUBMODULE_UPDATE_FLAGS到.gitlab-ci.yml。 variables: GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE...
在Gitlab jobs 使用 submodules,官网提供的方式:Use Git submodules in CI/CD jobs,大概就是说: 确保子项目 和 主项目 在 同一个 gitlab server 上; 在.gitlab-ci.yml文件 配置GIT_SUBMODULE_STRATEGY:normal 或 recursive: variables: GIT_SUBMODULE_STRATEGY: recursive 1. 2. 配置GIT_SUBMODULE_STRATEGY:...
variables:GIT_STRATEGY:cloneGIT_CHECKOUT:falsescript:-git checkout master-git merge $CI_BUILD_REF_NAME Git Submodule Strategy 需要GitLab Runner v1.10+。 GIT_SUBMODULE_STRATEGY变量用于在构建之前拉取代码时,Git子模块是否或者如何被引入。就像GIT_STRATEGY一样,它可在全局variables或者是单个job的variables模...
(1)在gitlab上创建一个空的仓库,这个称为主模块,在这个模块里面再创建子模块。 (2)在gitlab上再次创建一个空的仓库,这个空仓库是子模块,子模块还要创建一个文件,要提交到这个模块里面,因为子模块需要有commit 信息,主模块就是要链接到子模块这个commit信息里面(如果你已经有了子模块,并且提交过commit,可以不用...
variables:GIT_SUBMODULE_STRATEGY:recursive See the.gitlab-ci.ymlreferencefor more details aboutGIT_SUBMODULE_STRATEGY. If you are using an older version ofgitlab-ci-multi-runner, then usegit submodule sync/updateinbefore_script: before_script:-git submodule sync --recursive-git submodule update -...
克隆策略Git strategy GIT_STRATEGY 子模块策略Git submodule strategy GIT_SUBMODULE_STRATEGY 检出分支设置Git checkout GIT_CHECKOUT 清理工作Git clean flags GIT_CLEAN_FLAGS 作业重试次数 Job stages attempts 浅克隆 Shallow cloning GIT_DEPTH 废弃的关键字 types 和type 使用GIT_CLONE_PATH 自定义构建目录 处理...
none also re-uses the local working copy, but skips all Git operations (including GitLab Runner’s pre-clone script, if present). variables: GIT_STRATEGY: fetch Git submodule strategy 参考:《Git submodule strategy》 The GIT_SUBMODULE_STRATEGY variable is used to control if / how Git ...
variables:GIT_SUBMODULE_STRATEGY:recursive See the.gitlab-ci.ymlreferencefor more details aboutGIT_SUBMODULE_STRATEGY. If you are using an older version ofgitlab-ci-multi-runner, then usegit submodule sync/updateinbefore_script: before_script:-git submodule sync --recursive-git submodule update -...
Next, if you are usinggitlab-runnerv1.10+, you can set theGIT_SUBMODULE_STRATEGYvariable to eithernormalorrecursiveto tell the runner to fetch your submodules before the job: variables:GIT_SUBMODULE_STRATEGY:recursive See the.gitlab-ci.ymlreferencefor more details aboutGIT_SUBMODULE_STRATEGY. ...
variables:GIT_SUBMODULE_STRATEGY:recursive See the.gitlab-ci.ymlreferencefor more details aboutGIT_SUBMODULE_STRATEGY. If you are using an older version ofgitlab-ci-multi-runner, then usegit submodule sync/updateinbefore_script: before_script:-git submodule sync --recursive-git submodule update -...