From dbf580be57a4bb854d7ce20d313e3a22ea337be5 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Tue, 19 Sep 2017 18:14:41 -0400 Subject: [PATCH] Add a new entrypoint for CI Signed-off-by: Daniel Nephin --- Makefile | 5 +---- daemon/daemon.go | 5 +---- hack/ci/arm | 10 ++++++++++ hack/ci/experimental | 9 +++++++++ hack/ci/janky | 13 +++++++++++++ hack/ci/powerpc | 6 ++++++ hack/ci/z | 6 ++++++ hack/make.sh | 2 -- hack/make/test-unit | 6 ------ hack/make/tgz | 2 -- integration-cli/requirements_test.go | 4 ---- 11 files changed, 46 insertions(+), 22 deletions(-) create mode 100755 hack/ci/arm create mode 100755 hack/ci/experimental create mode 100755 hack/ci/janky create mode 100755 hack/ci/powerpc create mode 100755 hack/ci/z delete mode 100644 hack/make/test-unit delete mode 100644 hack/make/tgz diff --git a/Makefile b/Makefile index d9fb68b1de..7d50afa7d4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all binary dynbinary build cross deb help init-go-pkg-cache install manpages rpm run shell test test-docker-py test-integration test-unit tgz validate win +.PHONY: all binary dynbinary build cross deb help init-go-pkg-cache install manpages rpm run shell test test-docker-py test-integration test-unit validate win # set the graph driver as the current graphdriver if not set DOCKER_GRAPHDRIVER := $(if $(DOCKER_GRAPHDRIVER),$(DOCKER_GRAPHDRIVER),$(shell docker info 2>&1 | grep "Storage Driver" | sed 's/.*: //')) @@ -164,9 +164,6 @@ test-integration: build ## run the integration tests test-unit: build ## run the unit tests $(DOCKER_RUN_DOCKER) hack/test/unit -tgz: build ## build the archives (.zip on windows and .tgz\notherwise) containing the binaries - $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary binary cross tgz - validate: build ## validate DCO, Seccomp profile generation, gofmt,\n./pkg/ isolation, golint, tests, tomls, go vet and vendor $(DOCKER_RUN_DOCKER) hack/validate/all diff --git a/daemon/daemon.go b/daemon/daemon.go index 19d22bf702..cb9e8eeacc 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -140,10 +140,7 @@ func (daemon *Daemon) StoreHosts(hosts []string) { // HasExperimental returns whether the experimental features of the daemon are enabled or not func (daemon *Daemon) HasExperimental() bool { - if daemon.configStore != nil && daemon.configStore.Experimental { - return true - } - return false + return daemon.configStore != nil && daemon.configStore.Experimental } func (daemon *Daemon) restore() error { diff --git a/hack/ci/arm b/hack/ci/arm new file mode 100755 index 0000000000..e60332a608 --- /dev/null +++ b/hack/ci/arm @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# Entrypoint for jenkins arm CI build +set -eu -o pipefail + +hack/test/unit + +hack/make.sh \ + binary-daemon \ + dynbinary \ + test-integration diff --git a/hack/ci/experimental b/hack/ci/experimental new file mode 100755 index 0000000000..9ccbc8425f --- /dev/null +++ b/hack/ci/experimental @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# Entrypoint for jenkins experimental CI +set -eu -o pipefail + +export DOCKER_EXPERIMENTAL=y + +hack/make.sh \ + binary-daemon \ + test-integration diff --git a/hack/ci/janky b/hack/ci/janky new file mode 100755 index 0000000000..fe04908cbc --- /dev/null +++ b/hack/ci/janky @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# Entrypoint for jenkins janky CI build +set -eu -o pipefail + +hack/validate/default +hack/test/unit + +hack/make.sh \ + binary-daemon \ + dynbinary \ + test-integration \ + test-docker-py \ + cross diff --git a/hack/ci/powerpc b/hack/ci/powerpc new file mode 100755 index 0000000000..c36cf37dbf --- /dev/null +++ b/hack/ci/powerpc @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# Entrypoint for jenkins powerpc CI build +set -eu -o pipefail + +hack/test/unit +hack/make.sh dynbinary test-integration diff --git a/hack/ci/z b/hack/ci/z new file mode 100755 index 0000000000..5ba868e816 --- /dev/null +++ b/hack/ci/z @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# Entrypoint for jenkins s390x (z) CI build +set -eu -o pipefail + +hack/test/unit +hack/make.sh dynbinary test-integration diff --git a/hack/make.sh b/hack/make.sh index c52e634f97..bc18c066b6 100755 --- a/hack/make.sh +++ b/hack/make.sh @@ -59,12 +59,10 @@ DEFAULT_BUNDLES=( binary-daemon dynbinary - test-unit test-integration test-docker-py cross - tgz ) VERSION=${VERSION:-$(< ./VERSION)} diff --git a/hack/make/test-unit b/hack/make/test-unit deleted file mode 100644 index d985a6ec2d..0000000000 --- a/hack/make/test-unit +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -e - -echo "DEPRECATED: use hack/test/unit instead of hack/make.sh test-unit" >&2 - -$SCRIPTDIR/test/unit 2>&1 | tee -a "$DEST/test.log" diff --git a/hack/make/tgz b/hack/make/tgz deleted file mode 100644 index 1fd37b6b54..0000000000 --- a/hack/make/tgz +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -echo "tgz is deprecated" diff --git a/integration-cli/requirements_test.go b/integration-cli/requirements_test.go index 411248195b..f0bb969b24 100644 --- a/integration-cli/requirements_test.go +++ b/integration-cli/requirements_test.go @@ -56,10 +56,6 @@ func ExperimentalDaemon() bool { return testEnv.DaemonInfo.ExperimentalBuild } -func NotExperimentalDaemon() bool { - return !testEnv.DaemonInfo.ExperimentalBuild -} - func IsAmd64() bool { return os.Getenv("DOCKER_ENGINE_GOARCH") == "amd64" }