Share gitlab-ci.yml between projects

后端 未结 7 1234
面向向阳花
面向向阳花 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 21:39

    Since gitlab version 12.6, it's possible define a external .gitlab-cy.yml file.

    To customize the path:

    1. Go to the project's Settings > CI / CD.
    2. Expand the General pipelines section.
    3. Provide a value in the Custom CI configuration path field.
    4. Click Save changes. ...

    If the CI configuration will be hosted on an external site, the URL link must end with .yml:

    http://example.com/generate/ci/config.yml

    If the CI configuration will be hosted in a different project within GitLab, the path must be relative to the root directory in the other project, with the group and project name added to the end:

    .gitlab-ci.yml@mygroup/another-project

    my/path/.my-custom-file.yml@mygroup/another-project

提交回复
热议问题