something like:
→ → → → → → → →
something like:
→ → → → → → → →
Status | Subtype | Assigned | Task | |
---|---|---|---|---|
· · · | ||||
Resolved | • mmodell | T31 [keyresult] Connect Differential code review with continuous integration | ||
Resolved | • mmodell | T130950 Build glue from Differential to Nodepool | ||
Resolved | • mmodell | T130949 Spec out needed glue for Differential to Gearman to Nodepool | ||
Resolved | • chasemp | T131375 Make sure phab can talk to gearman and nodepool instances can talk to phabricator | ||
· · · |
So first we need to unblock the gearman port for iridium → gallium and then write a trivial script to enqueue build details via the gearman api.
Personally I feel like it would be cleaner if gallium offered an http api that phabricator could call directly from harbormaster's existing configurable http rest client, however, some sort of gearman client in phabricator won't be too hard to build.
Pasting here so it's not lost...
An email from Antoine about Gearman examples in PHP:
The Gearman doc has a few examples illustrating how to use the PHP class
to act as a client:So Harbormaster would do something like:
<?php // Create our client object $client = new GearmanClient(); // Add a server $client->addServer(); // by default host/port will be "localhost" & 4730 echo "Sending job\n"; $params = [ 'REPO' => 'RSCAP', 'DIFF' => 'D1234', 'REF' => 'ref/diff/D1234', ]; // Send reverse job $result = $client->doNormal("build:npm", json_encode( $params ) ); if ($result) { echo "Success: $result\n"; }
The reason I wanted jobs to be triggered via Gearman (instead of Jenkins REST API) was because the Jenkins Gearman Plugin can only put the slaves offline when a job is triggered over Gearman.
However, Mukunda has found the Jenkins Single Use Slave plugin which given a list of labels would put the associated slave offline on job completion. That fulfill the requirement and let us trigger build via the Jenkins REST API.
So this task is moot and no more needed.