I would like to trigger automated builds of multiple Docker tags of an image using a single HTTP POST request. I have not yet found a way to do that. Specifically, if I have a repo that has one Dockerfile for tags “preview” and “latest”, and another Dockerfile for tag “futures”, how would I programmatically trigger builds for both the “preview” and “latest” tags but not the “futures” tag?
Sending multiple HTTP POST requests back-to-back is not a good option because the requests could be throttled by DockerHub, in addition to performance concerns with sending multiple HTTP requests.
Based on the examples in the Build Triggers section in the Build Settings page of the repo, the four options are to trigger all tags, to trigger by Docker tag name, to trigger by source branch, or to trigger by source tag. All of my tags are in the same branch/tag in GitHub, so the last two options aren’t applicable. I played around with different syntaxes for specifying multiple Docker tag names using the second option, such as {“docker_tag”: “latest; preview”}, but I couldn’t find anything that worked.
Is this supported? If not, I think it would be a valuable feature, as it would allow more flexibility in the triggering of automated builds.