verify.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. # Copyright 2015 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. # Sets up the environment (e.g. installing godep and etcd if necessary)
  16. # and then runs all of the verification checks.
  17. set -o errexit
  18. set -o nounset
  19. set -o pipefail
  20. set -o xtrace
  21. # !!! ALERT !!! Jenkins default $HOME is /var/lib/jenkins, which is
  22. # global across jobs. We change $HOME instead to ${WORKSPACE}, which
  23. # is an incoming variable Jenkins provides us for this job's scratch
  24. # space.
  25. export HOME=${WORKSPACE} # Nothing should want Jenkins $HOME
  26. export GOPATH=${HOME}/_gopath
  27. export PATH=${GOPATH}/bin:${HOME}/third_party/etcd:/usr/local/go/bin:$PATH
  28. # Install a few things needed by the verification tests.
  29. command -v etcd &>/dev/null || ./hack/install-etcd.sh
  30. go get -u github.com/tools/godep
  31. make verify