ci: extract enabling ipv6 on docker into a script
This commit is contained in:
parent
bc9a0dc1b3
commit
d264e954dc
@ -111,15 +111,11 @@ steps:
|
||||
displayName: Install ninja
|
||||
condition: and(succeeded(), not(variables.SKIP_JOB))
|
||||
|
||||
# Looks like docker containers have IPv6 disabled by default, so let's turn it
|
||||
# on since libstd tests require it
|
||||
- bash: |
|
||||
set -e
|
||||
sudo mkdir -p /etc/docker
|
||||
echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json
|
||||
sudo service docker restart
|
||||
displayName: Enable IPv6
|
||||
condition: and(succeeded(), not(variables.SKIP_JOB), eq(variables['Agent.OS'], 'Linux'))
|
||||
- bash: src/ci/scripts/enable-docker-ipv6.sh
|
||||
env:
|
||||
AGENT_OS: $(Agent.OS)
|
||||
displayName: Enable IPv6 on Docker
|
||||
condition: and(succeeded(), not(variables.SKIP_JOB))
|
||||
|
||||
# Disable automatic line ending conversion (again). On Windows, when we're
|
||||
# installing dependencies, something switches the git configuration directory or
|
||||
|
14
src/ci/scripts/enable-docker-ipv6.sh
Executable file
14
src/ci/scripts/enable-docker-ipv6.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
# Looks like docker containers have IPv6 disabled by default, so let's turn it
|
||||
# on since libstd tests require it
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
|
||||
|
||||
if isLinux; then
|
||||
sudo mkdir -p /etc/docker
|
||||
echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json
|
||||
sudo service docker restart
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user