summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml5
-rwxr-xr-xbuild/docker/refresh.sh10
2 files changed, 8 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index edebbf32e..e89b3e02c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,10 +33,7 @@ services:
- docker
install:
- # https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
- # adding `travis_wait` because kerl building in the docker file takes >10 min for building erlang
- # without printing to stdout, resulting in build failures
- - if [[ `uname` == "Linux" ]]; then travis_wait build/docker/refresh.sh; fi
+ - if [[ `uname` == "Linux" ]]; then build/docker/refresh.sh; fi
stages:
- docker # docker images
diff --git a/build/docker/refresh.sh b/build/docker/refresh.sh
index 08cbc91e1..c9330b5eb 100755
--- a/build/docker/refresh.sh
+++ b/build/docker/refresh.sh
@@ -43,7 +43,7 @@ function dockerfile_changed {
#
# If this build has no DOCKER_PASS and it is in the docker stage
# then there's no reason to do any processing because we cannot
-# push the result if the Dockerfile changed.
+# push the result if the Dockerfile changed.
#
if [[ "$TRAVIS_BUILD_STAGE" == "docker" ]] && [[ -z "$DOCKER_PASS" ]]; then
@@ -70,9 +70,13 @@ popd
#
echo Rebuilding docker image $DISTRO
-docker build --tag $DOCKER_TAG build/docker/$DISTRO
-if [[ "$TRAVIS_BUILD_STAGE" == "docker" ]] && [[ ! -z "$DOCKER_USER" ]] && [[ ! -z "$DOCKER_PASS" ]]; then
+# https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
+# adding `travis_wait` because kerl building in the docker file takes >10 min for building erlang
+# without printing to stdout, resulting in build failures
+travis_wait 45 docker build --tag $DOCKER_TAG build/docker/$DISTRO
+
+if [[ "$TRAVIS_BUILD_STAGE" == "docker" ]] && [[ ! -z "$DOCKER_USER" ]] && [[ ! -z "$DOCKER_PASS" ]]; then
echo Pushing docker image $DOCKER_TAG
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push $DOCKER_TAG