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

phase1: allow to run webhooks #11

Closed
wants to merge 1 commit into from
Closed

Conversation

aparcar
Copy link
Member

@aparcar aparcar commented May 26, 2023

This is especially nice to trigger Docker builds containing the latest containers.

@@ -17,6 +17,10 @@ channel = #example-channel
nickname = example-builder
password = example

#[webhook]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this future proof and allow more hooks from the start, thus handling it as branches/workers?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with the reimplementation.

@aparcar
Copy link
Member Author

aparcar commented Jun 2, 2023

@ynezz I tried a more generic approach. Sadly I don't have any test infra for now, maybe @f00b4r0 can have a look at this, too?

@f00b4r0
Copy link
Contributor

f00b4r0 commented Jun 2, 2023

@aparcar not much time right now, however I have a couple questions:

@aparcar
Copy link
Member Author

aparcar commented Jun 21, 2023

From my understanding this is for the "checks" under a PR and not exactly what we want here.

Example:
image

  • extracting branch/target by splitting the builder name is definitely not robust and will be a problem if later we decide to change the naming pattern. These properties should be accessible directly from the build object. Maybe webhooks even supports Interpolate()?

Yes it's a bit awkward, do you mind pointing me to the properties I'm looking for?

@f00b4r0
Copy link
Contributor

f00b4r0 commented Jun 21, 2023

  • extracting branch/target by splitting the builder name is definitely not robust and will be a problem if later we decide to change the naming pattern. These properties should be accessible directly from the build object. Maybe webhooks even supports Interpolate()?

Yes it's a bit awkward, do you mind pointing me to the properties I'm looking for?

The branch property is automatically set by buildbot and available from the build properties. Check e.g. https://buildbot.staging.openwrt.org/images/api/v2/builds/5989/properties or look on the web UI at any build for the "Build Properties" tab.

For target, I would simply add a builder property at the BuilderConfig() invocation here:
https://github.com/openwrt/buildbot/blob/280a07b9e6ba928ce5495dc19ed68d17e990396c/phase1/master.cfg#LL1278C3-L1278C164

e.g.:

c['builders'].append(BuilderConfig(name=bldrname, workernames=workerNames, factory=factory, tags=[brname,], properties={'target':target}, nextBuild=GetNextBuild, canStartBuild=canStartBuild))

You can then Interpolate() both properties in your Reporter.

HTH

This is especially nice to trigger Docker builds containing the latest
containers.

Signed-off-by: Paul Spooren <[email protected]>
@aparcar
Copy link
Member Author

aparcar commented Sep 25, 2023

@f00b4r0 thanks, I reworked this PR based on your suggestions.

@aparcar
Copy link
Member Author

aparcar commented Sep 29, 2023

In the meantime solved via this:

openwrt/docker#119 (comment)

@ynezz
Copy link
Member

ynezz commented Nov 16, 2023

In the meantime solved via this:

Do I understand it correctly, that you don't want to proceed with this? Perhaps close it then? If you still want that included, then please make CI happy and thus we can merge/test/deploy this.

@aparcar
Copy link
Member Author

aparcar commented Feb 12, 2024

I'm using rsync-xfer instead

@aparcar aparcar closed this Feb 12, 2024
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

Successfully merging this pull request may close these issues.

3 participants