Add DockerHub support
Summary:
This change adds a service provider and a DockerHub facade to
be able to trigger a build for an image hosted on Docker Hub.
This will allow the notifications center to trigger new builds
when some event occurs, for example when app code is updated.
Ref T959.
Test Plan:
Unit tests.
Tested in real conditions with:
$ php artisan tinker Psy Shell v0.7.2 (PHP 5.6.16-1+deb.sury.org~trusty+1 — cli) by Justin Hileman >>> $factory = App::make('dockerhub'); => Keruald\DockerHub\Build\TriggerBuildFactory {#668} >>> $factory->build('nasqueron/aphlict'); => null >>> $factory->build('nasqueron/aphlictx'); InvalidArgumentException with message 'No token found for image nasqueron/aphlictx.' >>> DockerHub::build('nasqueron/auth-grove'); => null
Reviewers: dereckson
Subscribers: alken-orin
Maniphest Tasks: T959
Differential Revision: https://devcentral.nasqueron.org/D651