Ensure docker-proxy is installed in unit-test ci
(some) libnetwork tests require docker-proxy so we need to install that in CI. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
e837dd0fb8
commit
4da0dc974c
|
@ -190,7 +190,7 @@ pipeline {
|
||||||
-e VALIDATE_REPO=${GIT_URL} \
|
-e VALIDATE_REPO=${GIT_URL} \
|
||||||
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
||||||
docker:${GIT_COMMIT} \
|
docker:${GIT_COMMIT} \
|
||||||
hack/test/unit
|
hack/test/unit"
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
@ -587,7 +587,7 @@ pipeline {
|
||||||
-e VALIDATE_REPO=${GIT_URL} \
|
-e VALIDATE_REPO=${GIT_URL} \
|
||||||
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
||||||
docker:${GIT_COMMIT} \
|
docker:${GIT_COMMIT} \
|
||||||
hack/test/unit
|
hack/test/unit"
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
@ -786,7 +786,7 @@ pipeline {
|
||||||
-e VALIDATE_REPO=${GIT_URL} \
|
-e VALIDATE_REPO=${GIT_URL} \
|
||||||
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
||||||
docker:${GIT_COMMIT} \
|
docker:${GIT_COMMIT} \
|
||||||
hack/test/unit
|
hack/test/unit"
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
@ -982,7 +982,7 @@ pipeline {
|
||||||
-e VALIDATE_REPO=${GIT_URL} \
|
-e VALIDATE_REPO=${GIT_URL} \
|
||||||
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
||||||
docker:${GIT_COMMIT} \
|
docker:${GIT_COMMIT} \
|
||||||
hack/test/unit
|
hack/test/unit"
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
install_binary() {
|
||||||
|
local file="$1"
|
||||||
|
local target="${DOCKER_MAKE_INSTALL_PREFIX:=/usr/local}/bin/"
|
||||||
|
if [ "$(go env GOOS)" == "linux" ]; then
|
||||||
|
echo "Installing $(basename $file) to ${target}"
|
||||||
|
mkdir -p "$target"
|
||||||
|
cp -f -L "$file" "$target"
|
||||||
|
else
|
||||||
|
echo "Install is only supported on linux"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
|
@ -3,18 +3,7 @@
|
||||||
set -e
|
set -e
|
||||||
rm -rf "$DEST"
|
rm -rf "$DEST"
|
||||||
|
|
||||||
install_binary() {
|
source "${MAKEDIR}/.install"
|
||||||
local file="$1"
|
|
||||||
local target="${DOCKER_MAKE_INSTALL_PREFIX:=/usr/local}/bin/"
|
|
||||||
if [ "$(go env GOOS)" == "linux" ]; then
|
|
||||||
echo "Installing $(basename $file) to ${target}"
|
|
||||||
mkdir -p "$target"
|
|
||||||
cp -f -L "$file" "$target"
|
|
||||||
else
|
|
||||||
echo "Install is only supported on linux"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
(
|
(
|
||||||
DEST="$(dirname $DEST)/binary-daemon"
|
DEST="$(dirname $DEST)/binary-daemon"
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
rm -rf "$DEST"
|
||||||
|
|
||||||
|
source "${MAKEDIR}/.install"
|
||||||
|
|
||||||
|
(
|
||||||
|
DEST="$(dirname $DEST)/binary-proxy"
|
||||||
|
install_binary "${DEST}/docker-proxy"
|
||||||
|
)
|
|
@ -18,6 +18,11 @@ TESTDIRS="${TESTDIRS:-./...}"
|
||||||
exclude_paths='/vendor/|/integration'
|
exclude_paths='/vendor/|/integration'
|
||||||
pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)")
|
pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)")
|
||||||
|
|
||||||
|
echo "${pkg_list}" | grep --fixed-strings "libnetwork/drivers/bridge" && \
|
||||||
|
if ! type docker-proxy; then
|
||||||
|
hack/make.sh binary-proxy install-proxy
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p bundles
|
mkdir -p bundles
|
||||||
gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- \
|
gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- \
|
||||||
"${BUILDFLAGS[@]}" \
|
"${BUILDFLAGS[@]}" \
|
||||||
|
|
Loading…
Reference in New Issue