RFC: pipeline compile workflow/(step) #2254
Replies: 14 comments 24 replies
-
Add a own section called which uses normal workflow logic (default or custom clone) ... but it's output is no log but an pipeline config. tldr: with way we could support starlark, jsonnet (#1396), drone >= 1.0, ... without needing to add it to woodpecker core detailswe either could make a special compile pipeline, and show it as own entry, witch trigger the actual pipeline with its config we need to make sure we dont have a recursion in it -> see permutate example example:compile:
image: wp/jsonnet
settings:
file: woodpecker.jsonnet compile:
image: wp/replace-image # permutate normal wp pipeline config
pipeline:
normal-steps:
... workaround:use a Configuration Service be aware as we would support with multible workflows multible compiles ... that this get's complicated quite fast |
Beta Was this translation helpful? Give feedback.
-
we also might add a server flag to ignore this feature |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
I like the idea, this would also allow one to "emulate" some of the features of GitHub workflows by basically overriding a step declared with just a name and e.g. "fake" image with a step with all settings prepared (basically a plugin + the necessary config / commands)... which would increase code reusability and also ease updating a step in all repos (e.g. switching to a newer buildx plugin or changing defaults like proxy settings to match the environment) |
Beta Was this translation helpful? Give feedback.
-
would be nice to be able to specify global (or org wide) permutate image that would by applied than to all respective pipelines |
Beta Was this translation helpful? Give feedback.
-
This feature looks really great! Even if it was super-simple: generating entire woodpecker.yml using a docker image this would already provide enough tooling to write virtually any integration one can imagine. Thanks for thinking ahead and for your work 👍 |
Beta Was this translation helpful? Give feedback.
-
What would be the input/output scheme of this compile step? maybe an approach to how github workflows handles output could be taken, eg: the env-var adding this feature would make woodpicker a viable alternative for us, as we rely on jsonnet for some of our pipelines. |
Beta Was this translation helpful? Give feedback.
-
The standard is to use
I had a good experience using the matrix builds in tandem with the |
Beta Was this translation helpful? Give feedback.
-
well, yeah, in theory, tho i think you gonna have a very hard time to make all programs a user would potentially want to use comply with that. |
Beta Was this translation helpful? Give feedback.
-
I would propose to implement this as a generalization of the External configuration API. In fact, it might be able to replace that API, as issuing a POST to receive a pipeline configuration (as the API currenty does) would just be a special case of a new pipeline compilation step. The current workaround mentioned above does not work for private repositories or setups where the configurtion service can't pull the repo if that is needed to generate the pipeline configuration. I'm specifically running into this issue with the configuration service I build for nix flakes and private repositories. The API could also be extended to pass credentials in the POST, but a more generalized compile step like proposed here, would be a better and cleaner approach in my opinion. I don't know however, how this would look in the UI. It would make sense to have some dedicated step shown, with logging and status and so on to allow for debugging. |
Beta Was this translation helpful? Give feedback.
-
My current proposal to solve this In the repo-settings an admin can define docker image names for the config, secrets and repositories service (similar to #915). Those service will be automatically started when needed. The config service for example when a pipeline should be created / compiled from some config im the repo. The service is started by an agent similar to a step / pipeline service and receives a http request from woodpecker via an internal network. The service replies to woodpecker with its config data and the agent stops the service again. |
Beta Was this translation helpful? Give feedback.
-
Not sure if this is still being decided, but... what if instead of an explicit "compile" step, there was a mechanism in place for any step to generate additional steps to be run? Because of steps running in parallel, its probably not reasonable to allow a step to modify the whole pipeline, but being able to just add additional steps might solve this problem. |
Beta Was this translation helpful? Give feedback.
-
I feel like the perfect is the enemy of the good here. It's been more than a year since #1396 was opened (and closed), which was a fairly small PR, and yet would have allowed people with jsonnet setups to move away from drone-ci to woodpecker. Meanwhile there has been a year of sporadic discussion with no visible traction to a solution on the ideal solution (doing this generically). So yeah, a generic implementation would certainly be great, but until that comes along can we not have something like #1396 to unblock those of us who really want to move from drone-ci to woodpecker but can't because of this blocker? |
Beta Was this translation helpful? Give feedback.
-
ok i now got a exec plan:
to start implementing it:
|
Beta Was this translation helpful? Give feedback.
-
We want to allow admins of a repo to use custom compilers.
It should be possible to:
Open questions
Beta Was this translation helpful? Give feedback.
All reactions