Closed sils closed 7 years ago
The problem is clicking trigger build on Docker Hub doesnt set the arg build
, and .. it cant according to https://github.com/docker/hub-feedback/issues/508 . So those manually triggered builds use branch=master
.
However, it seems like it is possible to set arg using hook for Docker Cloud. I've set up a test case branch hook-test, but that build is taking forever to start (I probably used to many builds while trying a different solution that didnt work out.)
I've tested the 'trigger' button on Docker Cloud, and it also results in a build with branch=master
, even when a "Build Environment Variables" is added for branch={sourceref}
.
OTOH, a build hook works on Docker Hub, and presumably also works on Docker Cloud.
My 'evidence' that the build hook works is https://hub.docker.com/r/coala/base/builds/bgsuyaqjzxsmpblmnvjr8bz/ , where it is a manually triggered build that tries to checkout coala branch hook-test
.
Building in Docker Cloud's infrastructure...
Cloning into '.'...
Executing build hook...
Sending build context to Docker daemon 97.79 kB
Step 1/21 : FROM opensuse:tumbleweed
...
Cloning into 'coala'...
warning: Could not find remote branch hook-test to clone.
fatal: Remote branch hook-test not found in upstream origin
This problem affected 0.10 and 0.11rc, and the fix has been backported to both, and images rebuilt for both.