From 8f10d4d5b93354d5e689c18d51ffffc287029e6f Mon Sep 17 00:00:00 2001 From: Simon Li Date: Wed, 13 Sep 2017 18:35:15 +0100 Subject: [PATCH 1/2] Don't hard-code ports --- docker-compose.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9568af23..42f0a924 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,8 +36,8 @@ testintegration: extra_hosts: - "testintegration:127.0.0.1" ports: - - "14064:14064" - - "14063:14063" + - "14064" + - "14063" omero: extends: @@ -55,8 +55,8 @@ omero: # - JENKINS_USERNAME=${JENKINS_USERNAME} # - JENKINS_PASSWORD=${JENKINS_PASSWORD} ports: - - "4064:4064" - - "4063:4063" + - "4064" + - "4063" web: extends: @@ -96,8 +96,8 @@ nginx: # - JENKINS_USERNAME=${JENKINS_USERNAME} # - JENKINS_PASSWORD=${JENKINS_PASSWORD} ports: - - "80:80" - - "443:443" + - "80" + - "443" nginxjenkins: image: nginx:1.10 @@ -107,7 +107,7 @@ nginxjenkins: - ./jenkins/conf.d:/etc/nginx/conf.d - ./jenkins/sslcert:/etc/nginx/ssl ports: - - "8443:443" + - "443" redis: image: redis @@ -121,7 +121,7 @@ seleniumhub: # volumes: # - /dev/urandom:/dev/random ports: - - "4444:4444" + - "4444" seleniumfirefox: image: selenium/node-firefox:3.0.0-dubnium links: From acacb402a855af5259b6f024234729bbab31f257 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Wed, 13 Sep 2017 19:23:23 +0100 Subject: [PATCH 2/2] Use published port in travis --- runtest.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtest.sh b/runtest.sh index 940f2c74..99d3bf98 100755 --- a/runtest.sh +++ b/runtest.sh @@ -53,9 +53,10 @@ do done -curl -k -I https://localhost:8443 +JENKINS_PORT=$(docker-compose port nginxjenkins 443 | cut -d: -f2) +curl -k -I https://localhost:$JENKINS_PORT -STATUS=`curl -k --write-out %{http_code} --silent --output /dev/null https://localhost:8443` +STATUS=$(curl -k --write-out %{http_code} --silent --output /dev/null https://localhost:$JENKINS_PORT) if [ ! "200" == "$STATUS" ]; then exit 1