Page MenuHomeDevCentral

Trigger build to Docker Hub
ClosedPublic

Authored by dereckson on Aug 24 2016, 22:31.

Details

Summary

When a code repository is updated, we need to also update the Docker
image.

Fixes T959.

Test Plan
  • fire a GitHub push event
  • check it triggers a new build on Docker Hub
API reply
{
  "image": "nasqueron/notifications",
  "action": "TriggerDockerHubBuildAction",
  "error": null
},

Diff Detail

Repository
rNOTIF Notifications center
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dereckson retitled this revision from to WIP: trigger build to Docker Hub.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson added inline comments.
app/Jobs/NotifyNewCommitsToDockerHub.php
79 ↗(On Diff #1589)

We'll do this part instead in a Keruald DockerHub library.

dereckson edited edge metadata.

Use Keruald/OockerHub library, listener

dereckson edited edge metadata.

Library will handle build trigger

dereckson marked an inline comment as done.

Let's add in the factory a capability to check if we've a token for a repo, then use that here.

Mapping seems to be currently a YAGNI: it's reasonnable to wait someone wants to use this for repos with different names on DockerHub and GitHub.

app/Listeners/DockerHubListener.php
39

Mapping by name could be more interesting: we only have to check if we've a token with this name.

dereckson retitled this revision from WIP: trigger build to Docker Hub to Trigger build to Docker Hub.
dereckson edited the test plan for this revision. (Show Details)

Last details, ready to merge.

Unit tests needed.

dereckson edited edge metadata.
dereckson marked an inline comment as done.
This revision is now accepted and ready to land.Sep 4 2016, 01:29
This revision was automatically updated to reflect the committed changes.