【问题标题】:Gitlab-CI: checkout other branch than the one pushed toGitlab-CI:签出除推送到的分支之外的其他分支
【发布时间】:2017-01-11 15:38:12
【问题描述】:

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

dev_softwaredev_content

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

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

怎么做?

【问题讨论】:

    标签: yaml gitlab-ci


    【解决方案1】:

    我找到了办法:

    在每个阶段的开头添加以下内容:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-05
      • 2020-01-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-22
      • 2019-07-29
      相关资源
      最近更新 更多