release.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. # Copyright 2014 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. # Build a Kubernetes release. This will build the binaries, create the Docker
  16. # images and other build artifacts.
  17. # For pushing these artifacts publicly on Google Cloud Storage, see the
  18. # associated build/push-* scripts.
  19. set -o errexit
  20. set -o nounset
  21. set -o pipefail
  22. KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
  23. source "${KUBE_ROOT}/build/common.sh"
  24. KUBE_RELEASE_RUN_TESTS=${KUBE_RELEASE_RUN_TESTS-y}
  25. kube::build::verify_prereqs
  26. kube::build::build_image
  27. kube::build::run_build_command make cross
  28. if [[ $KUBE_RELEASE_RUN_TESTS =~ ^[yY]$ ]]; then
  29. kube::build::run_build_command make test
  30. kube::build::run_build_command make test-integration
  31. fi
  32. if [[ "${FEDERATION:-}" == "true" ]];then
  33. (
  34. source "${KUBE_ROOT}/build/util.sh"
  35. # Write federated docker image tag to workspace
  36. kube::release::semantic_image_tag_version > "${KUBE_ROOT}/federation/manifests/federated-image.tag"
  37. )
  38. fi
  39. kube::build::copy_output
  40. kube::release::package_tarballs
  41. kube::release::package_hyperkube