Gitlab-CI:checkout其他分支比推到的那个分支

时间:2017-01-11 15:38:13

标签: yaml gitlab-ci

我有一个设置,我在存储库中有两个分支。

dev_softwaredev_content

dev_content设置为保存dev_content的git子模块。

当内容开发人员推送到dev_content时,我需要触发与软件开发人员推送到dev_software时相同的构建过程。因此,我需要在每次推送时检查CI中的dev_software

怎么做?

1 个答案:

答案 0 :(得分:0)

我找到了一条路:

在每个舞台上,将以下内容放在开头:

build_multilang:
  stage: build
  script:
    - "git checkout dev_software"
    - "git pull"
    - <your other scripts here>