diff --git a/Jenkinsfile b/Jenkinsfile index ca5680553bacf7622beb55f28ce149c02242b311..e8da83475949fa28c75128a3710e4c1045f7a5ec 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 0000000000000000000000000000000000000000..3a3e3538c6053efb56a22d55f182470fbbae3693 --- /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 8af21b0de1d48da17e4db5b512721f740c623c1f..d643c3251bb431d415bc7a8b64fd6c82b611e577 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 0000000000000000000000000000000000000000..2f3fe3622e578348f658fd4bf69e88c471719939 --- /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 fa54c6eb71dce88e14916209799eb8615ca5cb16..10c2ab9ff590c4acc9fd91966aa51ee26e4a17d2 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[@]}" \