-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Conversion extension or pipeline modification "on the fly"? #4341
Comments
@zc-devs Thanks for the links, it clarified a lot! External configuration API seems to fit the problem, but only partially. If I get it correctly it's doing some pre-processing but still sending yaml syntax to the external API. There is no way to initialize the repository with pipeline in different syntax than yaml. I get the point that Woodpecker works on yaml files at the end, but for the pre-processing (in order to make sense of it) the source workflow should be in different lang like |
I'm not a |
Besides the fact it sucks and screws up IDEs it doesn't work (luckily) 😄 |
server/services/config/forge.go:116
server/services/setup.go:83
Didn't find that. Seems, it only fetches configs from external service in additional to configs from a forge. Edit
but they (
|
https://github.com/woodpecker-ci/example-config-service
@woodpecker-ci/maintainers
@nmapx, you cat try to make an addon. There is config extension in the example. But I don't promise you anything 😄 |
It should, with the archived repo. However, that feature is currently reworked in #3349. Thus we have the new repo, but this is not merged/ready yet. Docs will be updated together with the pr. |
@zc-devs Thanks for all that effort you put to understand my issue, really appreciate that! I think I will create plugin/addon of some sort in the future but since I got no time now I was looking for some other approach in the meantime. And... I found one. Maybe it's not exactly the same thing but I can achieve similar stuff this way also and the UX won't suck that much. Let me describe it briefly. As a reminder there are basically 2 main requirements:
First one I will be able to achieve using Pythons' Second one is more tricky since I need real programming within the pipeline runtime. Luckily I have an ability to run a shell binary that will work like a proxy for what I want to do. Example? Slack notification with message that I want to create "on the fly" depending on the runtime context will be build and sent by eg. Go application running from bash instead of workflow plugin. Of course it's like adding another layer which I'm not a big fan of but in this situation there are some pros too - I'm handling with real programming there, not some sketchy Yaml syntax (Starlark or Jsonnet are better but still comparing to Go, Rust or any other serious player... they all suck eventually 😄) @qwerty287 Well this is very usefull if you indeed have a need for extension API. But I don't think it will solve this particual case. As I mentioned earlier - Woodpecker would need to allow workflows in other langs as well to make it a powerfull feature. |
I actually thought that was working. At least when I tested it months ago I was setting the config path to sth like |
Oh, I see now. They are
So, you run general step with shell. Me too. Also thought about Python, but stuck just to POSIX shell only, it is available in most containers. |
It was FetchConfig(ctx context.Context, repo *model.Repo, pipeline *model.Pipeline, currentFileMeta []*forge_types.FileMeta, netrc *model.Netrc) (configData []*forge_types.FileMeta, useOld bool, err error) before #915, if it helps. |
If I understood correctly it supposed to be working some time ago, right? And now it doesn't. If so then is it possible to make it work as it used to? Then I would create an API extension that will do all the magic :) |
Clear and concise description of the problem
I'm currently moving from Drone to Woodpecker and while discovering differences I've noticed there is no such thing as conversion extension here. I guess it was introduced into Drone when Woodpecker was already there but I'm not sure. Maybe you could clarify more, or if it was removed why so? In my opinion it's a very useful and specific feature that allows more than just static pipelines. I'm talking here about "paved roads" / "golden paths" approach which allows creating complex yet very easy to maintain pipelines.
Suggested solution
Well, maybe it doesn't need to be conversion extension thing just like it is in Drone but something that would allow modifying pipeline syntax on the fly. This way we could easily introduce support for other languages (Starlark & Jsonnet) - it would eventually be converted into Yaml using this approach.
Alternative
No response
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]The text was updated successfully, but these errors were encountered: