1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 14:23:11 +00:00

Use drone-0.4 for CI and migrate build to dapper

This commit is contained in:
Ivan Mikushin
2015-12-14 16:38:19 +05:00
parent d18ec0d34b
commit 99bec55a2f
11 changed files with 62 additions and 199 deletions

View File

@@ -3,10 +3,4 @@ set -ex
cd $(dirname $0)/..
if [ -x "$(which wrapdocker)" ] && ! docker info >/dev/null 2>&1; then
wrapdocker
fi
docker build -t ros-build-base -f Dockerfile.build-base .
docker build -t ros-build -f Dockerfile.build .
./scripts/docker-run.sh --name ros-ci make -f Makefile.docker DEV_BUILD=1 minimal integration-tests
dapper -k -O make DEV_BUILD=1 test

View File

@@ -1,39 +0,0 @@
#!/bin/bash
set -e
DOCKER_ARGS=
if [ -n "$BIND_DIR" ]; then
if [ "$BIND_DIR" = "." ]; then
BIND_DIR=$(pwd)
fi
DOCKER_ARGS="-t -v $BIND_DIR:/go/src/github.com/rancher/os"
fi
if [ -c /dev/kvm ] || [ "${KVM}" == "1" ]; then
DOCKER_ARGS="${DOCKER_ARGS} --device=/dev/kvm:/dev/kvm"
fi
NAME=ros-build
while [ "$#" -gt 0 ]; do
case $1 in
--name)
shift 1
NAME="$1"
;;
--rm)
NAME=$(mktemp ${NAME}-XXXXXX)
rm $NAME
DOCKER_ARGS="${DOCKER_ARGS} --rm"
;;
-t)
DOCKER_ARGS="${DOCKER_ARGS} -t"
;;
*)
break
;;
esac
shift 1
done
DOCKER_ARGS="${DOCKER_ARGS} --name=${NAME}"
docker rm -fv ${NAME} >/dev/null 2>&1 || true
exec docker run -i -v /var/run/docker.sock:/var/run/docker.sock $DOCKER_ARGS ros-build "$@"