Skip to content

Commit

Permalink
Merge pull request kubernetes#32884 from Random-Liu/separate-build-fo…
Browse files Browse the repository at this point in the history
…r-node-e2e

Automatic merge from submit-queue

Add separate build process for node test.

This PR is part of kubernetes#31093. However, because currently node e2e is built on `KUBE_TEST_PLATFORMS`, which includes linux/amd64, darwin/amd64, windows/amd64 and linux/arm, it caused kubernetes#32251 to fail.

In fact, node e2e is running on the same node with kubelet, and it also has built-in apiserver, etcd and namespace controller. All of them are only built on `KUBE_SERVER_PLATFORMS`, so node e2e should also only be built on those platforms.
```
KUBE_SERVER_PLATFORMS=(
     linux/amd64
     linux/arm
     linux/arm64
   )
```

This PR added a separate build process for node e2e to address this.

@vishh Do you need this for v1.4? because this blocks your kubernetes#32251. /cc @dchen1107
(cherry picked from commit dae3bdd)
  • Loading branch information
Kubernetes Submit Queue authored and eparis committed Sep 17, 2016
1 parent 5c89b4f commit d37b318
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions build/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,11 @@ function kube::release::package_test_tarball() {
cp "${test_bins[@]/#/${LOCAL_OUTPUT_BINPATH}/${platform}/}" \
"${release_stage}/platforms/${platform}"
done
for platform in "${KUBE_NODE_TEST_PLATFORMS[@]}"; do
mkdir -p "${release_stage}/platforms/${platform}"
cp "${KUBE_NODE_TEST_BINARIES[@]/#/${LOCAL_OUTPUT_BINPATH}/${platform}/}" \
"${release_stage}/platforms/${platform}"
done

# Add the test image files
mkdir -p "${release_stage}/test/images"
Expand Down
11 changes: 10 additions & 1 deletion hack/lib/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ kube::golang::test_targets() {
federation/cmd/genfeddocs
vendor/github.com/onsi/ginkgo/ginkgo
test/e2e/e2e.test
test/e2e_node/e2e_node.test
)
if [ -n "${KUBERNETES_CONTRIB:-}" ]; then
for contrib in "${KUBERNETES_CONTRIB}"; do
Expand All @@ -147,6 +146,15 @@ readonly KUBE_TEST_PORTABLE=(
hack/lib
)

# Node test has built-in etcd and kube-apiserver, it can only be built on the
# same platforms with kube-apiserver.
readonly KUBE_NODE_TEST_TARGETS=(
vendor/github.com/onsi/ginkgo/ginkgo
test/e2e_node/e2e_node.test
)
readonly KUBE_NODE_TEST_BINARIES=("${KUBE_NODE_TEST_TARGETS[@]##*/}")
readonly KUBE_NODE_TEST_PLATFORMS=("${KUBE_SERVER_PLATFORMS[@]}")

# Gigabytes desired for parallel platform builds. 11 is fairly
# arbitrary, but is a reasonable splitting point for 2015
# laptops-versus-not.
Expand All @@ -162,6 +170,7 @@ readonly KUBE_ALL_TARGETS=(
"${KUBE_SERVER_TARGETS[@]}"
"${KUBE_CLIENT_TARGETS[@]}"
"${KUBE_TEST_TARGETS[@]}"
"${KUBE_NODE_TEST_TARGETS[@]}"
)
readonly KUBE_ALL_BINARIES=("${KUBE_ALL_TARGETS[@]##*/}")

Expand Down
2 changes: 2 additions & 0 deletions hack/make-rules/cross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ make all WHAT="${KUBE_SERVER_TARGETS[*]}" KUBE_BUILD_PLATFORMS="${KUBE_SERVER_PL
make all WHAT="${KUBE_CLIENT_TARGETS[*]}" KUBE_BUILD_PLATFORMS="${KUBE_CLIENT_PLATFORMS[*]}"

make all WHAT="${KUBE_TEST_TARGETS[*]}" KUBE_BUILD_PLATFORMS="${KUBE_TEST_PLATFORMS[*]}"

make all WHAT="${KUBE_NODE_TEST_TARGETS[*]}" KUBE_BUILD_PLATFORMS="${KUBE_NODE_TEST_PLATFORMS[*]}"

0 comments on commit d37b318

Please sign in to comment.