Page MenuHomeDevCentral

Add support for build trigger payloads
ClosedPublic

Authored by dereckson on Aug 2 2016, 21:39.
Tags
Referenced Files
F3776212: D596.diff
Sun, Nov 24, 21:39
Unknown Object (File)
Sat, Nov 23, 13:01
Unknown Object (File)
Wed, Nov 13, 01:28
Unknown Object (File)
Tue, Nov 12, 20:03
Unknown Object (File)
Tue, Nov 12, 16:07
Unknown Object (File)
Wed, Nov 6, 02:59
Unknown Object (File)
Wed, Nov 6, 02:01
Unknown Object (File)
Wed, Nov 6, 01:48
Subscribers
None

Details

Summary

Payloads to use when triggering a build to select what
exactly should be built.

Documentation is sparse, so this is based on examples
given at the /~/settings/automated-builds/ repo page
on Docker Hub.

Ref T965

Test Plan

Run tests, fire build with JSON encoded version of these payloads.

Diff Detail

Repository
rKDOCKERHUB Keruald Docker Hub
Lint
Lint Passed
Unit
Tests Passed
Branch
payloads
Build Status
Buildable 880
Build 1021: arc lint + arc unit

Event Timeline

dereckson retitled this revision from to Add support for build trigger payloads.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson added inline comments.
src/Build/Payloads/SourceRepositoryBuildPayload.php
10

Abstract this.

"Tag" or "Branch" are internal kitchen and doesn't need to be exposed to the other classes.

29

Throw an exception if tag isn't the expected type.

In C#, I'd say throw an enum, but I don't have a good feeling with enums in PHP when we've to add a dependency.

Oh, and class constants aren't the way to write "Tag" is probably easier than "SourceRepositoryBuildPayload::TAG" or even SourceRepository::TAG.

src/Build/TriggerBuild.php
13

This class

dereckson edited edge metadata.

Single responsibility.

dereckson marked 2 inline comments as done.
dereckson added inline comments.
src/Build/Payloads/SourceRepositoryBuildPayload.php
29

Test me.

47

Test me.

src/Build/TriggerBuild.php
89

@param $branch

100

@param $tag

src/Build/TriggerBuild.php
13

We'll do that in a separate commit.

78

.

96

.

dereckson marked 6 inline comments as done.
dereckson edited edge metadata.

Switch to a static approach for isValidType, more tests.

Rebased against D597.

dereckson edited edge metadata.
dereckson marked 2 inline comments as done.
This revision is now accepted and ready to land.Aug 3 2016, 19:34
dereckson edited edge metadata.

Explanation for NotExistingObjectBuildPayloadMock.

This revision was automatically updated to reflect the committed changes.