hudson.sh 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. # CDH3b3 requires tight umask setting.
  20. umask 0022
  21. BINDIR=$(dirname $0)
  22. HUE_ROOT=$PWD
  23. export REPO_TRACE=1
  24. . $BINDIR/build-functions
  25. # Use $SKIP_CLEAN if the cleaning is done outside of this script.
  26. if [ -z "$SKIP_CLEAN" ]; then
  27. echo "Cleaning repo."
  28. git clean -xdf
  29. rm -rf ext
  30. git reset --hard HEAD
  31. else
  32. echo "Skipping cleaning of repo."
  33. fi
  34. build_hadoop
  35. build_hive
  36. make apps
  37. if python -V 2>&1 | grep -q -v 2.4; then
  38. # Install pylint from our archive
  39. build/env/bin/easy_install \
  40. -f http://archive.cloudera.com/desktop-sdk-python-packages/ \
  41. -H archive.cloudera.com pylint
  42. build/env/bin/hue runpylint all -- -f parseable > PYLINT.txt
  43. fi
  44. rm -f JAVASCRIPTLINT.txt
  45. for FILE in $(find . -name *.js);
  46. do
  47. jsl -conf .jslintrc -nologo -nosummary -nocontext -nofilelisting -process $FILE >> JAVASCRIPTLINT.txt || /bin/true
  48. done;
  49. if [ "$1" == "slow" ]; then
  50. make test-slow
  51. elif [ "$1" == "windmill" ]; then
  52. xvfb-run -a -s '-screen 0 1024x768x16' tools/hudson/hudson_windmill_in_X.sh
  53. else
  54. make test docs
  55. fi