jenkins.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/bash
  2. # Licensed to Cloudera, Inc. under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. Cloudera, Inc. licenses this file
  6. # to you under the Apache License, Version 2.0 (the
  7. # "License"); you may not use this file except in compliance
  8. # with the License. You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. set -e
  18. set -x
  19. sudo yum install -y cyrus-sasl-devel cyrus-sasl cyrus-sasl-plain cyrus-sasl-lib
  20. # CDH3b3 requires tight umask setting.
  21. umask 0022
  22. BINDIR=$(dirname $0)
  23. HUE_ROOT=$PWD
  24. export REPO_TRACE=1
  25. . $BINDIR/build-functions
  26. # Use $SKIP_CLEAN if the cleaning is done outside of this script.
  27. if [ -z "$SKIP_CLEAN" ]; then
  28. echo "Cleaning repo."
  29. git clean -xdf
  30. rm -rf ext
  31. git reset --hard HEAD
  32. else
  33. echo "Skipping cleaning of repo."
  34. fi
  35. build_hadoop
  36. build_hive
  37. build_oozie
  38. build_sqoop
  39. make apps
  40. build/env/bin/hue runpylint > PYLINT.txt
  41. rm -f JAVASCRIPTLINT.txt
  42. for FILE in $(find . -name *.js);
  43. do
  44. jsl -conf .jslintrc -nologo -nosummary -nocontext -nofilelisting -process $FILE >> JAVASCRIPTLINT.txt || /bin/true
  45. done;
  46. if [ "$1" == "slow" ]; then
  47. make test-slow
  48. elif [ "$1" == "windmill" ]; then
  49. xvfb-run -a -s '-screen 0 1024x768x16' tools/hudson/hudson_windmill_in_X.sh
  50. else
  51. make test docs
  52. fi