Docker Community Forums

Share and learn in the Docker community.

Build configuration: Match any branch


(Phubar) #1

Ignore this post, it’s become inaccurate. See 1.12.3 broke autobuilds - Dockerfile pathing changed

Using ?!master as a source will properly match any branch again after Docker Cloud’s next release.

Original post:

This isn’t as much of a question but rather sharing what I have figured out to run automated tests on branches. A few days ago some things changed with the build configuration that brought some behaviour changes. These are the configurations I have now:

The first one matches any branch that is not master. The second and third match different Dockerfiles on master.

This works quite well, except with the recent changes, the first rule matches both Dockerfiles in the repo; the explicit path seems to get ignored. In my case I can live with it though for the time being.

In pull requests on github it shows up like this:

Thought someone might find this useful.

Regex in Automated build
1.12.3 broke autobuilds - Dockerfile pathing changed