Skip to content

Automatic CI for pull requests (progress tracking issue) #1415

Closed
@rvagg

Description

/cc @iojs/build

This is not done yet but I've spent some quality time with my head in code (as a leisure activity!) and have made good enough progress at this point to start turning it on and experimenting with it.

There are 3 components I'm working on:

  • GitHub Webhook endpoint that listens to events from the repo and takes action based on the type of event. For pull requests it'll act based on opening a new PR and updating an existing PR. It'll also look up the user that did the PR and decide whether they are "trusted" or "untrusted" based on whether they are in the iojs/Collaborators team on GitHub. It then passes on this data to the jenkins interactor.
  • Jenkins Interactor that knows how to speak Jenkins. It can receive authenticated requests for new runs for either trusted or untrusted users on any user/project#branch combo on GitHub. For untrusted users it'll run these in the iojs+any-pr+containers job and for trusted users it'll run them on iojs+any-pr+multi. It also keeps track of the builds on both of these jobs so it knows (a) the status of them including what types of slaves they are run on and the status of each of those slaves and (b) the user/project#branch parameters so you can look up a build based on either a build number or a user/project#branch combo and you'll get the latest build for that combo.
  • Status badges for GitHub - this component is the most incomplete but I have a lot of the parts of it in place thanks to nodei.co and all the data is now available in the Jenkins Interactor. The idea is that the bot that interacts with GitHub will either comment on the PR or update the PR head comment to include a badge and that badge would show the current status of the latest build for the user/project#branch combo of that PR including what the status of each of the slaves are. So you'll get to see right in the PR whether you're building, passing or failing on any of the slave.

I've hooked up what I have to this repo and re-delivered a webhook notification for the last PR #1412 and it's triggered a build here: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/497/

The containers build jobs need a lot of love because they just haven't been used and we have problems with git, file descriptors and some other random things that keep them from being useful.

Not sure what the timeline is for getting all of this working but one of my next tasks is to get the code of this up in a repo on iojs so others can contribute. I'll post status updates here but at least for now at least collaborators can trigger CI runs themselves without having full Jenkins access.

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.metaIssues and PRs related to the general management of the project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions