mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Check in latest Win2Lin Jenkins scripts
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
48d4e2d953
commit
d86f0d9b6d
2 changed files with 43 additions and 6 deletions
35
hack/Jenkins/W2L/postbuild.sh
Normal file
35
hack/Jenkins/W2L/postbuild.sh
Normal file
|
@ -0,0 +1,35 @@
|
|||
set +x
|
||||
set +e
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "---"
|
||||
echo "Now starting POST-BUILD steps"
|
||||
echo "---"
|
||||
echo ""
|
||||
|
||||
echo INFO: Pointing to $DOCKER_HOST
|
||||
|
||||
if [ ! $(docker ps -aq | wc -l) -eq 0 ]; then
|
||||
echo INFO: Removing containers...
|
||||
! docker rm -vf $(docker ps -aq)
|
||||
fi
|
||||
|
||||
# Remove all images which don't have docker or ubuntu in the name
|
||||
if [ ! $(docker images | sed -n '1!p' | grep -v 'docker' | grep -v 'ubuntu' | awk '{ print $3 }' | wc -l) -eq 0 ]; then
|
||||
echo INFO: Removing images...
|
||||
! docker rmi -f $(docker images | sed -n '1!p' | grep -v 'docker' | grep -v 'ubuntu' | awk '{ print $3 }')
|
||||
fi
|
||||
|
||||
# Kill off any instances of git, go and docker, just in case
|
||||
! taskkill -F -IM git.exe -T >& /dev/null
|
||||
! taskkill -F -IM go.exe -T >& /dev/null
|
||||
! taskkill -F -IM docker.exe -T >& /dev/null
|
||||
|
||||
# Remove everything
|
||||
! cd /c/jenkins/gopath/src/github.com/docker/docker
|
||||
! rm -rfd * >& /dev/null
|
||||
! rm -rfd .* >& /dev/null
|
||||
|
||||
echo INFO: Cleanup complete
|
||||
exit 0
|
|
@ -1,7 +1,8 @@
|
|||
# Jenkins CI script for Windows to Linux CI.
|
||||
# Heavily modified by John Howard (@jhowardmsft) December 2015 to try to make it more reliable.
|
||||
set +x
|
||||
SCRIPT_VER="4-Jan-2016 15:19 PST"
|
||||
set +e
|
||||
SCRIPT_VER="18-Feb-2016 11:47 PST"
|
||||
|
||||
# TODO to make (even) more resilient:
|
||||
# - Check if jq is installed
|
||||
|
@ -18,6 +19,7 @@ SCRIPT_VER="4-Jan-2016 15:19 PST"
|
|||
# - Tidy up of images and containers. Either here, or in the teardown script.
|
||||
|
||||
ec=0
|
||||
uniques=1
|
||||
echo INFO: Started at `date`. Script version $SCRIPT_VER
|
||||
|
||||
# get the ip
|
||||
|
@ -212,22 +214,22 @@ fi
|
|||
GOVER_DOCKERFILE=`grep 'ENV GO_VERSION' Dockerfile | awk '{print $3}'`
|
||||
GOVER_INSTALLED=`go version | awk '{print $3}'`
|
||||
if [ "${GOVER_INSTALLED:2}" != "$GOVER_DOCKERFILE" ]; then
|
||||
ec=1 # Uncomment to make CI fail once all nodes are updated.
|
||||
#ec=1 # Uncomment to make CI fail once all nodes are updated.
|
||||
echo
|
||||
echo "---------------------------------------------------------------------------"
|
||||
echo "ERROR: CI should be using go version $GOVER_DOCKERFILE, but is using ${GOVER_INSTALLED:2}"
|
||||
echo " This is currently a warning, but should (will) become an error in the future."
|
||||
echo "WARN: CI should be using go version $GOVER_DOCKERFILE, but is using ${GOVER_INSTALLED:2}"
|
||||
echo " Please ping #docker-maintainers on IRC to get this CI server updated."
|
||||
echo "---------------------------------------------------------------------------"
|
||||
echo
|
||||
fi
|
||||
|
||||
# Check the Linux box is running a matching version of docker
|
||||
if [ "$uniques" -ne 1 ]; then
|
||||
ec=1 # Uncomment to make CI fail once all nodes are updated.
|
||||
ec=0 # Uncomment to make CI fail once all nodes are updated.
|
||||
echo
|
||||
echo "---------------------------------------------------------------------------"
|
||||
echo "ERROR: This CI node is not running the same version of docker as the daemon."
|
||||
echo " This is a CI configuration issue"
|
||||
echo " This is a CI configuration issue."
|
||||
echo "---------------------------------------------------------------------------"
|
||||
echo
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue