Docker Community Forums

Share and learn in the Docker community.

Manually trigger tag build via API

(Janauer) #1

Is it possible to start builds of specific image tags via the Docker Cloud API without creating automated build triggers first? I am just interested in building, not deploying a service.

I am writing an application that needs to trigger builds in multiple repositories only on certain conditions, so autobuilds are not possible. Also, manually configuring build triggers is not an option in my case. However, there is no documentation on the Docker Cloud build API (api/build/v1) other than build triggers. Ideally, it would be possible to call:

  "source_type": "Tag",
  "source_name": "1.2.3",
  "docker_tag": "latest,1,1.2,1.2.3"

From what I’ve discovered so far, the only way to achieve this is to create both a build rule and trigger first and then POST to that build trigger. But even those endpoints are not documented (though used by the Docker Cloud web interface) and I’m not sure whether this API is considered stable.

(Wongwill86) #2

Has anyone found out how to do this yet? or has found documentation for the Docker Cloud build API?

I would like to build “any branch that’s not master” so this would be very useful to automatically trigger the correct branch.

With docker hub, you can specify the source tag and name but you can’t specify the build context.

With docker cloud you can specify the build context … but nothing else?

Am I missing something here?