Ver código fonte

Add a new entrypoint for CI

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Daniel Nephin 7 anos atrás
pai
commit
dbf580be57
11 arquivos alterados com 46 adições e 22 exclusões
  1. 1 4
      Makefile
  2. 1 4
      daemon/daemon.go
  3. 10 0
      hack/ci/arm
  4. 9 0
      hack/ci/experimental
  5. 13 0
      hack/ci/janky
  6. 6 0
      hack/ci/powerpc
  7. 6 0
      hack/ci/z
  8. 0 2
      hack/make.sh
  9. 0 6
      hack/make/test-unit
  10. 0 2
      hack/make/tgz
  11. 0 4
      integration-cli/requirements_test.go

+ 1 - 4
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
 

+ 1 - 4
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 {

+ 10 - 0
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

+ 9 - 0
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

+ 13 - 0
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

+ 6 - 0
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

+ 6 - 0
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

+ 0 - 2
hack/make.sh

@@ -59,12 +59,10 @@ DEFAULT_BUNDLES=(
 	binary-daemon
 	dynbinary
 
-	test-unit
 	test-integration
 	test-docker-py
 
 	cross
-	tgz
 )
 
 VERSION=${VERSION:-$(< ./VERSION)}

+ 0 - 6
hack/make/test-unit

@@ -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"

+ 0 - 2
hack/make/tgz

@@ -1,2 +0,0 @@
-#!/usr/bin/env bash
-echo "tgz is deprecated"

+ 0 - 4
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"
 }