diff --git a/Jenkinsfile b/Jenkinsfile index ca5680553b..e8da834759 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -190,7 +190,7 @@ pipeline { -e VALIDATE_REPO=${GIT_URL} \ -e VALIDATE_BRANCH=${CHANGE_TARGET} \ docker:${GIT_COMMIT} \ - hack/test/unit + hack/test/unit" ''' } post { @@ -587,7 +587,7 @@ pipeline { -e VALIDATE_REPO=${GIT_URL} \ -e VALIDATE_BRANCH=${CHANGE_TARGET} \ docker:${GIT_COMMIT} \ - hack/test/unit + hack/test/unit" ''' } post { @@ -786,7 +786,7 @@ pipeline { -e VALIDATE_REPO=${GIT_URL} \ -e VALIDATE_BRANCH=${CHANGE_TARGET} \ docker:${GIT_COMMIT} \ - hack/test/unit + hack/test/unit" ''' } post { @@ -982,7 +982,7 @@ pipeline { -e VALIDATE_REPO=${GIT_URL} \ -e VALIDATE_BRANCH=${CHANGE_TARGET} \ docker:${GIT_COMMIT} \ - hack/test/unit + hack/test/unit" ''' } post { diff --git a/hack/make/.install b/hack/make/.install new file mode 100644 index 0000000000..3a3e3538c6 --- /dev/null +++ b/hack/make/.install @@ -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 +} \ No newline at end of file diff --git a/hack/make/install-binary b/hack/make/install-binary index 8af21b0de1..d643c3251b 100644 --- a/hack/make/install-binary +++ b/hack/make/install-binary @@ -3,18 +3,7 @@ set -e rm -rf "$DEST" -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 -} +source "${MAKEDIR}/.install" ( DEST="$(dirname $DEST)/binary-daemon" diff --git a/hack/make/install-proxy b/hack/make/install-proxy new file mode 100644 index 0000000000..2f3fe3622e --- /dev/null +++ b/hack/make/install-proxy @@ -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" +) \ No newline at end of file diff --git a/hack/test/unit b/hack/test/unit index fa54c6eb71..10c2ab9ff5 100755 --- a/hack/test/unit +++ b/hack/test/unit @@ -18,6 +18,11 @@ TESTDIRS="${TESTDIRS:-./...}" exclude_paths='/vendor/|/integration' 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 gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- \ "${BUILDFLAGS[@]}" \