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
F4035050: D647.id.diff
Tue, Jan 21, 15:49
Unknown Object (File)
Tue, Jan 21, 05:12
Unknown Object (File)
Mon, Jan 20, 16:00
Unknown Object (File)
Wed, Jan 15, 10:57
Unknown Object (File)
Sun, Jan 12, 12:32
Unknown Object (File)
Fri, Jan 10, 20:14
Unknown Object (File)
Fri, Jan 10, 01:50
Unknown Object (File)
Wed, Jan 8, 02:27
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.