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
F3716740: D647.id.diff
Tue, Nov 5, 19:39
Unknown Object (File)
Sun, Nov 3, 23:59
Unknown Object (File)
Fri, Nov 1, 19:18
Unknown Object (File)
Mon, Oct 21, 20:56
Unknown Object (File)
Sun, Oct 20, 21:26
Unknown Object (File)
Mon, Oct 14, 16:29
Unknown Object (File)
Mon, Oct 14, 15:59
Unknown Object (File)
Oct 3 2024, 21:10
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.