e2e-node-jenkins.sh 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. # indirectly generates test/e2e/generated/bindata.go too
  26. make generated_files
  27. # TODO converge build steps with hack/build-go some day if possible.
  28. go build test/e2e_node/environment/conformance.go
  29. PARALLELISM=${PARALLELISM:-8}
  30. WORKSPACE=${WORKSPACE:-"/tmp/"}
  31. ARTIFACTS=${WORKSPACE}/_artifacts
  32. TIMEOUT=${TIMEOUT:-"45m"}
  33. mkdir -p "${ARTIFACTS}"
  34. go run test/e2e_node/runner/remote/run_remote.go --logtostderr --vmodule=*=4 \
  35. --ssh-env="gce" --ssh-user="$GCE_USER" --zone="$GCE_ZONE" --project="$GCE_PROJECT" \
  36. --hosts="$GCE_HOSTS" --images="$GCE_IMAGES" --image-project="$GCE_IMAGE_PROJECT" \
  37. --image-config-file="$GCE_IMAGE_CONFIG_PATH" --cleanup="$CLEANUP" \
  38. --results-dir="$ARTIFACTS" --ginkgo-flags="--nodes=$PARALLELISM $GINKGO_FLAGS" \
  39. --test-timeout="$TIMEOUT" --test_args="$TEST_ARGS --kubelet-flags=\"$KUBELET_ARGS\"" \
  40. --instance-metadata="$GCE_INSTANCE_METADATA" --system-spec-name="$SYSTEM_SPEC_NAME" \
  41. --extra-envs="$EXTRA_ENVS"