Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Support shared configs #1089

Closed
3 tasks done
anbraten opened this issue Aug 11, 2022 · 5 comments
Closed
3 tasks done

Support shared configs #1089

anbraten opened this issue Aug 11, 2022 · 5 comments
Labels
feature add new functionality

Comments

@anbraten
Copy link
Member

anbraten commented Aug 11, 2022

Clear and concise description of the problem

As a user with multiple similar Woodpecker projects, I would like to share some configs between them. This would allow me to adjust configs by only editing it at one place.

Suggested solution

  • "importing" pipeline config templates via urls
  • some kind of callable pipeline would be nice: a pipeline that is working like a function which will be called by some other pipeline by passing some arguments

Alternative

In the meantime it would be possible to use #915 to use my own config pre-processing service which somehow injects shared configs.

Additional context

No response

Validations

@anbraten anbraten added the feature add new functionality label Aug 11, 2022
@benyanke
Copy link

benyanke commented Sep 11, 2022

Adding additional info from the now-closed-as-duplicate #1179:

As someone who has a number of small repos that all require similar CI config, I find gitlab's CI includes very useful.

This allows you to reference yaml documents in another repo and then they are included, and YAML merged, if multiples. This allows more composable pipelines, with more flexibility than the Woodpecker plugins (which are excellent, for some workflows).

gitlab include docs
https://docs.gitlab.com/ee/ci/yaml/includes.html

To use my own gitlab repos as an example:

I have a repo at gitlab.com/benyanke/common-ci-configs containing a number of composable CI bits that I use in various projects. One builds and pushes a docker container, one builds a hugo site, one publishes a hugo site to Netlify (a hosting provider), one publishes a hugo site to another provider, one lints, tests, and builds Golang projects, etc. On any given project, instead of needing to redefine all the required logic for a docker or go project, I simply include the go or docker include.

@JFronny
Copy link

JFronny commented Oct 28, 2022

I have attempted to implement something like this using the External Configuration API, but it seems that woodpecker fails to find pipelines using custom syntax, which my service is supposed to convert (adding an include key, in this case). If that is fixed, implementing this in a separate service would become trivial.
Edit: I have implemented a PoC of this feature as an external service that processes comments in the yaml file here

@genofire
Copy link

For me, that is really importent ... i am really thinking of switching to gitlab-ci again for that.

@genofire genofire mentioned this issue Dec 23, 2022
7 tasks
@6543
Copy link
Member

6543 commented Dec 23, 2022

For me, that is really importent ... i am really thinking of switching to gitlab-ci again for that.

that's sad but whatever works best for you :/

This was referenced Jul 31, 2023
@anbraten
Copy link
Member Author

anbraten commented Aug 6, 2023

@woodpecker-ci woodpecker-ci locked and limited conversation to collaborators Aug 20, 2023
@anbraten anbraten converted this issue into discussion #2286 Aug 20, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
feature add new functionality
Projects
None yet
Development

No branches or pull requests

5 participants