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

Does woodpecker support builds based on files changeset #112

Closed
iamsudip opened this issue Jan 21, 2020 · 7 comments
Closed

Does woodpecker support builds based on files changeset #112

iamsudip opened this issue Jan 21, 2020 · 7 comments

Comments

@iamsudip
Copy link

Please refer to this: microadam/drone-config-changeset-conditional#20

Is there any way I can enable it for our installation?

@github-actions
Copy link

Looks like this is your first issue. Welcome to the community! 👋

@laszlocph
Copy link
Member

Hello @iamsudip

The 0.8 line did not have that feature, nor it is currently available in Woodpecker.

Technically it is not too difficult to implement, as git has the changeset information for every commit. I created this issue to track this feature: #87

@iamsudip
Copy link
Author

@laszlocph Can I expect a timeline? I see, you are a sole maintainer of this project, If you can't ensure a timeline, can you point me to the part of code where this can be implemented, I'll see if I can implement?

@laszlocph
Copy link
Member

This is where the webhook from Github arrives: https://github.com/laszlocph/woodpecker/blob/bc80063ccb0dee901954893491a7635293497872/server/hook.go#L75

It's a change that has to trickle through many parts of the system. The internal representation of the build also needs to know about the changeset and not generate build steps according to this new condition:

https://github.com/laszlocph/woodpecker/blob/bc80063ccb0dee901954893491a7635293497872/server/hook.go#L255
https://github.com/laszlocph/woodpecker/blob/bc80063ccb0dee901954893491a7635293497872/server/hook.go#L255
https://github.com/laszlocph/woodpecker/blob/e2801e82737ccef0b771a194bfb5731e3f1a838d/cncd/pipeline/pipeline/frontend/yaml/constraint_test.go

I can't promise a timeline, just assure you that I want to have this feature too and it will arrive.

@sudip-moengage
Copy link

sudip-moengage commented May 11, 2020

Can I do it through a plugin? I'm not proficient in go. Can you tell me how can I achieve this by writing a plugin in other language? @laszlocph

We are using woodpecker at scale more than 1000 builds per week and docker adoption just started and will scale upto 20x. We use woodpecker for secret checking, automating mundane operational work etc. This feature is really important for us. So, I'm desperate to work around this.

@laszlocph
Copy link
Member

The problem is that when the plugin gets the control, the build has already started. You can fail the build based on git changeset at that point, but the build will show up as a failed build.

@anbraten
Copy link
Member

General support for path conditions added by #174 and #235

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

4 participants