Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

[#202] Trigger builds on push via GitHub webhooks #208

Merged
merged 4 commits into from
Jul 5, 2016

Conversation

adiroiban
Copy link
Member

@adiroiban adiroiban commented Jun 23, 2016

Scope

This add support for triggering builds when branches are pushed.

This tries to fix #202

Change

For now, the secret / payload authentication is not enabled as I don't have write access to the private repo. The variables for supporting authentication are defined.

For now only the supported builds are auto-triggered for non-trunk branches.

txbuildbot/scheduler.py was removed as it was only used for fileIsImportant and this can be configured with a simple callable.

TwistedGitHubEventHandler was created only to prevent accidental hooks on PR.
If we want to enable building on PR, we should create a new issue in brain and test this scenario.

The production builders uses a secret token and it always asks for signed payloads.

For Vagrant VM the sample private files come without requiring a token

As a drive by, I have updated the updatefast() method to reduce code duplication.

How to test

Testing in Vagrant VM

Create or get some payload from https://github.com/twisted/twisted/settings/hooks/8337490

Check the readme for help in delivering the hooks.

Deliver a payload for trunk and non-trunk and observer how the changes are triggred.

You can observe them by looking at a builder http://172.16.255.140:8080/builders/check-manifest

You should observer that multiple builds are delayed for 5 seconds and then only the last build is triggered.

Once a build is triggred, look at the build property and observer the scheduler field. It should be trunk for trunk commits and branch-supported for non-trunk builds.

Also trunk commits will trigger all builders, including the ones which are not supported.

Testing in production

This branch can be applied to production.
For an existing PR or an existing or new branch push a commit. Observer that the supported builds are triggered and that the status is updated.

@adiroiban
Copy link
Member Author

Changed applied in production from this branch. Not yet merged.

Please review

@hawkowl hawkowl merged commit 3c499f4 into master Jul 5, 2016
@hawkowl
Copy link
Member

hawkowl commented Jul 5, 2016

lgtm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-trigger stable builds on branch commits
2 participants