kubeadm.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. set -o errexit
  16. set -o nounset
  17. set -o pipefail
  18. run_kubeadm_tests() {
  19. set -o nounset
  20. set -o errexit
  21. KUBEADM_PATH="${KUBEADM_PATH:=$(kube::realpath "${KUBE_ROOT}")/cluster/kubeadm.sh}"
  22. # If testing a different version of kubeadm than the current build, you can
  23. # comment this out to save yourself from needlessly building here.
  24. make -C "${KUBE_ROOT}" WHAT=cmd/kubeadm
  25. make -C "${KUBE_ROOT}" test \
  26. WHAT=k8s.io/kubernetes/cmd/kubeadm/test/cmd \
  27. KUBE_TEST_ARGS="--kubeadm-path '${KUBEADM_PATH}'"
  28. set +o nounset
  29. set +o errexit
  30. }