Page MenuHomeDevCentral

Send HTTP payload to Docker Hub to trigger a build
ClosedPublic

Authored by dereckson on Sep 2 2016, 23:34.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 21:13
Unknown Object (File)
Fri, Nov 22, 21:08
Unknown Object (File)
Fri, Nov 22, 15:37
Unknown Object (File)
Fri, Nov 22, 02:43
Unknown Object (File)
Thu, Nov 21, 02:43
Unknown Object (File)
Tue, Nov 19, 06:09
Unknown Object (File)
Tue, Nov 12, 19:54
Unknown Object (File)
Tue, Nov 12, 10:33
Subscribers
None

Details

Summary

Until there, the library allowed to prepare payloads
to trigger a build. We implement two ways to actually
send them through a Guzzle client.

Through a TriggerBuild class:

$client = new Client; // A Guzzle client
$token = "00000000-0000-0000-0000-000000000000"; // Token on Docker Hub
$image = new DockerHubImage("acme", "foo");
$trigger = $image->getTriggerBuild($client, $token);
$trigger->sendPayloadForDockerTag("alpha");

Shorcut syntax to trigger a full build:

$client = new Client; // A Guzzle client
$token = "00000000-0000-0000-0000-000000000000"; // Token on Docker Hub
$image = new DockerHubImage("acme", "foo");
$image->triggerBuild($client, $token);

Fixes T965.

Test Plan

More unit tests

Diff Detail

Repository
rKDOCKERHUB Keruald Docker Hub
Lint
Lint Passed
Unit
Tests Passed
Branch
trigger
Build Status
Buildable 989
Build 1194: arc lint + arc unit

Event Timeline

dereckson retitled this revision from to Send HTTP payload to Docker Hub to trigger a build.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson edited the test plan for this revision. (Show Details)
dereckson updated this object.
dereckson edited edge metadata.

EOL-at-EOF

dereckson edited edge metadata.
This revision is now accepted and ready to land.Sep 2 2016, 23:39
This revision was automatically updated to reflect the committed changes.