POETSII / Orchestrator

The Orchestrator is the configuration and run-time management system for POETS platforms.
1 stars 1 forks source link

Continuous Integration Setup #266

Closed mvousden closed 3 years ago

mvousden commented 3 years ago

About

This changeset introduces some Orchestrator-facing modifications to help integration with the new continuous integration framework at https://github.com/poetsii/orchestrator-ci. This will allow us to see at a glance if a PR has "broken something". You'll note this PR has a little green checkmark, indicating that all of the checks were successful. The main gain of this is that it becomes apparent, at a glance, whether a set of changes breaks something.

Briefly, these changes:

The Server

The CI server is powered by buildbot, currently lives on Muerte, and is owned/managed by the user zwingli. It polls GitHub for new pull requests. When it finds a new pull request, it git checkouts it, and runs the following checks in parallel:

Server setup instructions exist in the readme at https://github.com/POETSII/orchestrator-ci. It is simple enough to move around, as the configuration is all in-source, apart from dependencies and secrets (again, see the readme). Note that the server doesn't actually run any POETS applications. If configured with a worker than runs on POETS hardware, it can be made to of course.

The web UI of the buildbot is hosted on port 8010 of the box. Only authorised users can manually trigger jobs - to authorise, you need to log in via GitHub while connected to the box at localhost:8010. Sucks I know, but since it's not hosted on the Internet, that's what you get. Still, if you can SSH to the box, you can use port forwarding ala ssh 8010:localhost:8010 muerte, so it's not all bad. The web UI gives you information on why a check might have failed, including stdout/err, timing information, what commit was checked out, and more.

Accounts

The GitHub account @poets-bot is responsible for all pulls. It authenticates via SSH. The POETS CI GitHub app (https://github.com/organizations/POETSII/settings/applications/1128274) is used to post check results.

On Merge

After this is merged in, we should change our policy to only merge pull requests that do not break any of the checks in-place.