ソースを参照

Fix stalling tests on init systems.

Jeff Geerling 8 年 前
コミット
23866e4b31
1 ファイル変更22 行追加13 行削除
  1. 22 13
      .travis.yml

+ 22 - 13
.travis.yml

@@ -2,24 +2,33 @@
 sudo: required
 
 env:
-  - distro: centos7
-    init: /usr/lib/systemd/systemd
-    run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
-  - distro: ubuntu1604
-    init: /lib/systemd/systemd
-    run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
-  - distro: ubuntu1404
-    init: /sbin/init
-    run_opts: ""
-  - distro: ubuntu1204
-    init: /sbin/init
-    run_opts: ""
+  global:
+    # https://github.com/travis-ci/travis-ci/issues/6461#issuecomment-239577306
+    DOCKER_VERSION: "1.9.1-0~trusty"
+  matrix:
+    - distro: centos7
+      init: /usr/lib/systemd/systemd
+      run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
+    - distro: ubuntu1604
+      init: /lib/systemd/systemd
+      run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
+    - distro: ubuntu1404
+      init: /sbin/init
+      run_opts: ""
+    - distro: ubuntu1204
+      init: /sbin/init
+      run_opts: ""
 
 services:
   - docker
 
 before_install:
-  # Pull container
+  # Downgrade to older version of Docker engine.
+  - sudo apt-get update
+  - sudo apt-get remove docker-engine -yq
+  - sudo apt-get install docker-engine=$DOCKER_VERSION -yq --no-install-suggests --no-install-recommends --force-yes -o Dpkg::Options::="--force-confnew"
+
+  # Pull container.
   - 'sudo docker pull geerlingguy/docker-${distro}-ansible:latest'
 
 script: