summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2018-01-02 16:47:12 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2018-01-10 09:49:53 +0100
commitb31fa6493ff667b5e4e06eda88f6e4dcf992f216 (patch)
tree9730f40766e9acad6721392f1cbb6a266463f634 /.travis.yml
parentcf5c513ff94ff0a0f5e89018f3ffe57f6e47129c (diff)
downloadefl-b31fa6493ff667b5e4e06eda88f6e4dcf992f216.tar.gz
travis: test docker build with prebuild image for speedup
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml26
1 files changed, 22 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 98f937f4cc..3cd3c7826a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,9 +8,6 @@ os: linux
services:
- docker
-before_install:
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then .ci/ci-osx-deps.sh ; fi
-
matrix:
include:
- env: DISTRO=Ubuntu1710
@@ -25,6 +22,27 @@ matrix:
# Xcode 7.3.1, OS X 10.11
# Xcode 8.3.3, OS X 10.12
+before_install:
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then .ci/ci-osx-deps.sh ; fi
+
+before_script:
+ - |
+ if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$DISTRO" != "" ]]; then
+ docker pull stefanschmidt1/ci-support-files:$DISTRO
+ fi
+
script:
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$DISTRO" != "" ]]; then docker build -f .ci/Dockerfile-$DISTRO . ; fi
+ - |
+ if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$DISTRO" != "" ]]; then
+ docker run -v `pwd`:/src -w /src stefanschmidt1/ci-support-files:$DISTRO /src/.ci/ci-linux-build.sh
+ fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then .ci/ci-osx-build.sh ; fi
+
+after_success:
+ - |
+ if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$DISTRO" != "" ]]; then
+ docker login -u stefanschmidt1 -p "$DOCKER_PASSWORD"
+ docker tag stefanschmidt1/ci-support-files:$DISTRO stefanschmidt1/ci-support-files:$DISTRO-$TRAVIS_BUILD_NUMBER
+ docker push stefanschmidt1/ci-support-files:$DISTRO
+ docker push stefanschmidt1/ci-support-files:$DISTRO-$TRAVIS_BUILD_NUMBER
+ fi