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
F3928350: D647.id.diff
Sun, Dec 22, 04:50
Unknown Object (File)
Tue, Dec 17, 07:05
Unknown Object (File)
Mon, Dec 16, 11:11
Unknown Object (File)
Mon, Dec 16, 05:11
Unknown Object (File)
Fri, Dec 13, 05:03
Unknown Object (File)
Tue, Dec 10, 00:25
Unknown Object (File)
Mon, Dec 9, 22:33
Unknown Object (File)
Mon, Dec 9, 21:13
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.