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
F3763821: D647.diff
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
Unknown Object (File)
Sun, Nov 10, 07:33
Unknown Object (File)
Sun, Nov 10, 01:16
Unknown Object (File)
Fri, Nov 8, 00:12
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 Not Applicable
Unit
Tests Not Applicable

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.