e2e-node-jenkins.sh 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/usr/bin/env bash
  2. # Copyright 2016 The Kubernetes Authors.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. # Script executed by jenkins to run node e2e tests against gce
  16. # Usage: test/e2e_node/jenkins/e2e-node-jenkins.sh <path to properties>
  17. # Properties files:
  18. # - test/e2e_node/jenkins/jenkins-ci.properties : for running jenkins ci
  19. # - test/e2e_node/jenkins/jenkins-pull.properties : for running jenkins pull request builder
  20. # - test/e2e_node/jenkins/template.properties : template for creating a properties file to run locally
  21. set -e
  22. set -x
  23. : "${1:?Usage test/e2e_node/jenkins/e2e-node-jenkins.sh <path to properties>}"
  24. . "${1}"
  25. # Until all GOPATH references are removed from all build scripts as well,
  26. # explicitly disable module mode to avoid picking up user-set GO111MODULE preferences.
  27. # As individual scripts make use of go modules, they can explicitly set GO111MODULE=on
  28. export GO111MODULE=off
  29. # indirectly generates test/e2e/generated/bindata.go too
  30. make generated_files
  31. # TODO converge build steps with hack/build-go some day if possible.
  32. go build test/e2e_node/environment/conformance.go
  33. PARALLELISM=${PARALLELISM:-8}
  34. WORKSPACE=${WORKSPACE:-"/tmp/"}
  35. ARTIFACTS=${WORKSPACE}/_artifacts
  36. TIMEOUT=${TIMEOUT:-"45m"}
  37. mkdir -p "${ARTIFACTS}"
  38. go run test/e2e_node/runner/remote/run_remote.go --logtostderr --vmodule=*=4 \
  39. --ssh-env="gce" --ssh-user="$GCE_USER" --zone="$GCE_ZONE" --project="$GCE_PROJECT" \
  40. --hosts="$GCE_HOSTS" --images="$GCE_IMAGES" --image-project="$GCE_IMAGE_PROJECT" \
  41. --image-config-file="$GCE_IMAGE_CONFIG_PATH" --cleanup="$CLEANUP" \
  42. --results-dir="$ARTIFACTS" --ginkgo-flags="--nodes=$PARALLELISM $GINKGO_FLAGS" \
  43. --test-timeout="$TIMEOUT" --test_args="$TEST_ARGS --kubelet-flags=\"$KUBELET_ARGS\"" \
  44. --instance-metadata="$GCE_INSTANCE_METADATA" --system-spec-name="$SYSTEM_SPEC_NAME" \
  45. --extra-envs="$EXTRA_ENVS"