docker-compose-rule
docker-compose-rule copied to clipboard
Run Windows CI on every PR
We're issuing commands which need different escaping on Mac / windows. Let's get some AppVeyor CI going.
https://github.com/palantir/docker-compose-rule/pull/166
@samwright I've got AppVeyor approved so we should be unblocked to actually put Windows CI on all PRs for docker compose rule :)


That's excellent news! You'll find the build will fail (lots of test failures) until #169 and #171 are merged. You'll also need to set the DOCKER_LOCATION and DOCKER_COMPOSE_LOCATION env variables, or merge #170 (which scans $PATH instead).
It might be easier to merge those before enabling the windows build, but that's your choice.
I've got just one more test to fix: HostNetworkedPortsIntegrationTest. This tests that having docker use the 'host' network type means the container uses the host's network, so the host can see connect to all container ports on localhost and vice-versa (afaik). I get the following:
java.lang.IllegalStateException: The cluster failed to pass a startup check: DockerPort [ip=127.0.0.1, portMapping=PortMapping [externalPort=5432, internalPort=5432]]was not listening
Since docker on windows/mac is actually running inside a linux VM, the "host" is not 127.0.0.1 but the linux VM (running on 10.0.75.1), and its firewall/docker seems to prevent connecting to these ports (i.e. curl 10.0.75.1:5432 fails). Here is a discussion showing that this is intended behaviour: https://forums.docker.com/t/should-docker-run-net-host-work/14215.
@iamdanfox You mentioned you're on Mac, so if I'm correct you should be having the same problem running HostNetworkedPortsIntegrationTest. Is this correct? If so I guess the best course would be to use JUnit's Assume to skip the test when on Windows/Mac.
@samwright you are correct this doesn't work on Mac - I believe when the test was originally written it was before Docker for Mac existed and while the behaviour with docker-machine wasn't great it was at least functional. Using an assume here seems like the best thing to do.
Just an update, docker-compose-rule now builds on Windows and passes all tests :-D
@samwright excellent. Unfortunately appveyor only supports Windows containers so I'm adding a quick smoke test that uses a Windows base image to ensure we don't regress in the future.
@hpryce @iamdanfox - looks like this is resolved - just want to double check and make sure that's the case.
We good to close this out?