docker-compose-rule icon indicating copy to clipboard operation
docker-compose-rule copied to clipboard

Run Windows CI on every PR

Open iamdanfox opened this issue 8 years ago • 7 comments

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

iamdanfox avatar Mar 01 '17 14:03 iamdanfox

@samwright I've got AppVeyor approved so we should be unblocked to actually put Windows CI on all PRs for docker compose rule :)

screen shot 2017-03-02 at 13 46 29 screen shot 2017-03-02 at 13 49 19

iamdanfox avatar Mar 02 '17 13:03 iamdanfox

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.

samwright avatar Mar 02 '17 14:03 samwright

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 avatar Mar 02 '17 14:03 samwright

@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.

hpryce avatar Mar 06 '17 11:03 hpryce

Just an update, docker-compose-rule now builds on Windows and passes all tests :-D

samwright avatar Mar 08 '17 17:03 samwright

@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 avatar Mar 08 '17 17:03 hpryce

@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?

fryz avatar Apr 30 '18 21:04 fryz