Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🍀 Proposal: I hope there will be an entry for custom Gitlab CI templates #377

Closed
imxw opened this issue Apr 1, 2022 · 2 comments
Closed
Assignees

Comments

@imxw
Copy link
Member

imxw commented Apr 1, 2022

Description

The current GitLab CI pipeline plugin uses the official template which usually needs to be modified before it works on our project. In practice, we rarely use official templates directly, but often customize our own templates according to different programming languages as shown below.

image

The .gitlab-ci.yml in a project can refer to these base templates, so that we only need to make a few small changes to implement a pipeline.

image

Every time I create a project I have to create a new .gitlab-ci.yml file, then copy and paste it and make minor changes. Even so, I still want to simplify it a bit more and turn this file all into a template and use dtm to push it directly to the project for me.

So I want the plugin to provide a template url parameter to specify the template path, and then a template var parameter to replace the variables that need to be replaced in the template.

options:
  tplUrl: https://xxx/xxx/xxx.yaml
  tplVars:
    key1: value1
    key2: value2

Honestly, I think this approach works not only for GitLab CI, but also for other CI tools that support pipeline as code.

Describe the Alternatives You Have Considered

The template url should be able to get the template file in a subdirectory of a repository

@daniel-hutao
Copy link
Member

daniel-hutao commented Apr 2, 2022

/cc @IronCore864 Please take a look at this proposal.

@daniel-hutao daniel-hutao changed the title Proposal: I hope there will be an entry for custom Gitlab CI templates 🍀 Proposal: I hope there will be an entry for custom Gitlab CI templates May 17, 2022
@IronCore864
Copy link
Member

Implemented in #396

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants