Share gitlab-ci.yml between projects

后端 未结 7 1233
面向向阳花
面向向阳花 2020-12-13 21:04

We are thinking to move our ci from jenkins to gitlab. We have several projects that have the same build workflow. Right now we use a shared library where the pipelines are

7条回答
  •  醉酒成梦
    2020-12-13 21:40

    GitLab 11.7 introduces new include methods, such as include:file: https://docs.gitlab.com/ee/ci/yaml/#includefile

    include:
      - project: 'my-group/my-project'
        ref: master
        file: '/templates/.gitlab-ci-template.yml'
    

    This will allow you to create a new project on the same GitLab instance which contains a shared .gitlab-ci.yml.

提交回复
热议问题