зеркало из https://github.com/microsoft/docker.git
Merge pull request #19196 from Microsoft/jjh/tp4ci
Windows CI: Setup for testing against Windows
This commit is contained in:
Коммит
637f49b5af
|
@ -31,7 +31,7 @@ fi
|
|||
if ! docker inspect "${images[@]}" &> /dev/null; then
|
||||
hardCodedDir='/docker-frozen-images'
|
||||
if [ -d "$hardCodedDir" ]; then
|
||||
# Do not use a subshell for the following command. Windows CI
|
||||
# Do not use a subshell for the following command. Windows to Linux CI
|
||||
# runs bash 3.x so will not trap an error in a subshell.
|
||||
# http://stackoverflow.com/questions/22630363/how-does-set-e-work-with-subshells
|
||||
set -x; tar -cC "$hardCodedDir" . | docker load; set +x
|
||||
|
@ -56,7 +56,7 @@ if ! docker inspect "${images[@]}" &> /dev/null; then
|
|||
}
|
||||
}
|
||||
' "${DOCKERFILE:=Dockerfile}" | sh -x
|
||||
# Do not use a subshell for the following command. Windows CI
|
||||
# Do not use a subshell for the following command. Windows to Linux CI
|
||||
# runs bash 3.x so will not trap an error in a subshell.
|
||||
# http://stackoverflow.com/questions/22630363/how-does-set-e-work-with-subshells
|
||||
set -x; tar -cC "$dir" . | docker load; set +x
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# This scripts sets up the required images for Windows to Windows CI
|
||||
|
||||
# Tag windowsservercore as latest
|
||||
set +e
|
||||
! BUILD=$(docker images | grep windowsservercore | grep -v latest | awk '{print $2}')
|
||||
if [ -z $BUILD ]; then
|
||||
echo "ERROR: Could not find windowsservercore images"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
! LATESTCOUNT=$(docker images | grep windowsservercore | grep -v $BUILD | wc -l)
|
||||
if [ $LATESTCOUNT -ne 1 ]; then
|
||||
set -e
|
||||
docker tag windowsservercore:$BUILD windowsservercore:latest
|
||||
echo "INFO: Tagged windowsservercore:$BUILD with latest"
|
||||
fi
|
||||
|
||||
# Busybox (requires windowsservercore)
|
||||
if [ -z "$(docker images | grep busybox)" ]; then
|
||||
echo "INFO: Building busybox"
|
||||
docker build -t busybox https://raw.githubusercontent.com/jhowardmsft/busybox/master/Dockerfile
|
||||
fi
|
|
@ -2,7 +2,12 @@
|
|||
set -e
|
||||
|
||||
bundle .detect-daemon-osarch
|
||||
bundle .ensure-emptyfs
|
||||
bundle .ensure-frozen-images
|
||||
bundle .ensure-httpserver
|
||||
bundle .ensure-syscall-test
|
||||
if [ $DOCKER_ENGINE_GOOS != "windows" ]; then
|
||||
bundle .ensure-emptyfs
|
||||
bundle .ensure-frozen-images
|
||||
bundle .ensure-httpserver
|
||||
bundle .ensure-syscall-test
|
||||
else
|
||||
# Note this is Windows to Windows CI, not Windows to Linux CI
|
||||
bundle .ensure-frozen-images-windows
|
||||
fi
|
||||
|
|
Загрузка…
Ссылка в новой задаче