Commit 0d0b02a4 authored by Caleb Marchent's avatar Caleb Marchent Committed by Facebook Github Bot

Travis split out docker ipv6 enable (#1108)

Summary:
Split out enable IPv6 on docker into its own script.
Do not do this on MacOS hosts; where we would not be running in a docker container.
use apt add-on rather; which automatically disabled for non-apt supporting OSes (MacOSX)
Pull Request resolved: https://github.com/facebook/folly/pull/1108

Reviewed By: vitaut

Differential Revision: D14899358

Pulled By: calebmarchent

fbshipit-source-id: 342e7a37e27317018d98d77e8603c896f34b3bc6
parent c12e5941
......@@ -5,17 +5,10 @@ sudo: required
# Docker disables IPv6 in containers by default. Enable it for unit tests that need [::1].
before_script:
# `daemon.json` is normally missing, but let's log it in case that changes.
- sudo touch /etc/docker/daemon.json
- sudo cat /etc/docker/daemon.json
- sudo service docker stop
# This needs YAML quoting because of the curly braces.
- 'echo ''{"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64"}'' | sudo tee /etc/docker/daemon.json'
- sudo service docker start
# Fail early if docker failed on start -- add `- sudo dockerd` to debug.
- sudo docker info
# Paranoia log: what if our config got overwritten?
- sudo cat /etc/docker/daemon.json
- if [[ "$TRAVIS_OS_NAME" != "osx" ]];
then
sudo build/fbcode_builder/docker_enable_ipv6.sh;
fi
env:
global:
......@@ -39,9 +32,11 @@ matrix:
- env: ['os_image=ubuntu:16.04', gcc_version=5]
services: [docker]
addons:
apt:
packages: python2.7
script:
# Travis seems to get confused when `matrix:` is used with `language:`
- sudo apt-get install python2.7
# We don't want to write the script inline because of Travis kludginess --
# it looks like it escapes " and \ in scripts when using `matrix:`.
- ./build/fbcode_builder/travis_docker_build.sh
......
#!/bin/sh
# `daemon.json` is normally missing, but let's log it in case that changes.
touch /etc/docker/daemon.json
service docker stop
echo '{"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64"}' > /etc/docker/daemon.json
service docker start
# Fail early if docker failed on start -- add `- sudo dockerd` to debug.
docker info
# Paranoia log: what if our config got overwritten?
cat /etc/docker/daemon.json
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment