jenkins-prod-tarball.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. BINDIR=$(dirname $0)
  20. HUE_ROOT=$PWD
  21. export REPO_TRACE=1
  22. . $BINDIR/build-functions
  23. ##############################
  24. # Build prod tarball
  25. ##############################
  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. make prod
  37. ##############################
  38. # Build Hue from within SDK dir
  39. ##############################
  40. cd build/release/prod/
  41. cd $(ls -d hue-* | grep -v tgz)
  42. make apps
  43. ##############################
  44. # Smoke tests
  45. ##############################
  46. ./build/env/bin/hue config_help
  47. ##############################
  48. # Install
  49. ##############################
  50. INSTALL_DIR=$(pwd)/../installdir make install
  51. ##############################
  52. # Check install
  53. ##############################
  54. cd ../installdir
  55. ./build/env/bin/hue config_help