Review Board 1.6.3

[core] Update tests to use latest builds of dependencies

Review Request #2446 - submitted 1 year, 5 months ago

Abraham Elmahrek Reviewers
hue
romain, enricoberti
None hue-rw
commit 25686418453a3ce3f061094eeb6d6a90855b39bc
Author: abec <abe@cloudera.com>
Date:   Thu Nov 15 15:11:34 2012 -0800

    [core] Update tests to use latest builds of dependencies
    
    - Based on mtime

:100644 100644 ebeea3e... 58debc7... M	tools/jenkins/build-functions
Manually tested no regression

Diff revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

1 2 3
1 2 3

  1. tools/jenkins/build-functions: Loading...
tools/jenkins/build-functions
Revision ebeea3ecfe13549f4d4c8ddcf7392b3d7f851e89 New Change
... 13 lines hidden [Expand]
14
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
# See the License for the specific language governing permissions and
15
# See the License for the specific language governing permissions and
16
# limitations under the License.
16
# limitations under the License.
17
# Common functions for hudson build scripts
17
# Common functions for hudson build scripts
18

   
18

   

   
19
check_mtime() {

   
20
  MTIME_FILE=${1}

   
21
  MTIME=$( curl -Is ${2} | awk 'BEGIN {FS=":"} { if ($1 == "Last-Modified") { print substr($2,2) } }' )

   
22

   

   
23
  if echo "${MTIME}" | diff ${MTIME_FILE} - > /dev/null; then

   
24
    return 0

   
25
  else

   
26
    echo ${MTIME} > ${MTIME_FILE}

   
27
    return 1

   
28
  fi;

   
29
}

   
30

   

   
31
##########
19
#
32
#
20
# Use $CDH_URL to control where to download Hadoop.
33
# Use $CDH_URL to control where to download Hadoop.
21
# If not specified, it uses the $CDH variable to select an archive location.
34
# If not specified, it uses the $CDH variable to select an archive location.
22
#
35
#
23

   
36

   
24
CDH_URL=${CDH_URL:-http://nightly.cloudera.com/cdh4/cdh/4/hadoop-2.0.0-cdh4.2.0-SNAPSHOT.tar.gz}
37
CDH_URL=${CDH_URL:-http://nightly.cloudera.com/cdh4/cdh/4/hadoop-2.0.0-cdh4.2.0-SNAPSHOT.tar.gz}
25

   
38

   
26
CDH_TGZ=$(basename $CDH_URL)
39
CDH_TGZ=$(basename $CDH_URL)
27
CDH_VERSION=${CDH_TGZ/.tar.gz/}
40
CDH_VERSION=${CDH_TGZ/.tar.gz/}
28
CDH_CACHE="$HOME/.hue_cache/${CDH_TGZ}"
41
CDH_CACHE="$HOME/.hue_cache/${CDH_TGZ}"

   
42
CDH_MTIME_FILE="$HOME/.hue_cache/.cdh_mtime"
29

   
43

   
30
build_hadoop() {
44
build_hadoop() {
31
  if [ ! -f $CDH_CACHE ]; then
45
  if ! check_mtime ${CDH_MTIME_FILE} ${CDH_URL} || [ ! -f $CDH_CACHE ]; then
32
    mkdir -p $HOME/.hue_cache
46
    mkdir -p $HOME/.hue_cache
33
    echo "Downloading $CDH_URL..."
47
    echo "Downloading $CDH_URL..."
34
    wget $CDH_URL -O $CDH_CACHE
48
    wget $CDH_URL -O $CDH_CACHE
35
  fi
49
  fi
36

   
50

   
... 13 lines hidden [Expand]
50

   
64

   
51
MR1_TGZ=$(basename $MR1_URL)
65
MR1_TGZ=$(basename $MR1_URL)
52
MR1_VERSION=${MR1_TGZ/.tar.gz/}
66
MR1_VERSION=${MR1_TGZ/.tar.gz/}
53
MR1_VERSION=${MR1_VERSION/mr1/hadoop}
67
MR1_VERSION=${MR1_VERSION/mr1/hadoop}
54
MR1_CACHE="$HOME/.hue_cache/${MR1_TGZ}"
68
MR1_CACHE="$HOME/.hue_cache/${MR1_TGZ}"

   
69
MR1_MTIME_FILE="$HOME/.hue_cache/.mr1_mtime"
55

   
70

   
56
build_mr1() {
71
build_mr1() {
57
  if [ ! -f $MR1_CACHE ]; then
72
  if ! check_mtime ${MR1_MTIME_FILE} ${MR1_URL} || [ ! -f $MR1_CACHE ]; then
58
    mkdir -p $HOME/.hue_cache
73
    mkdir -p $HOME/.hue_cache
59
    echo "Downloading $MR1_URL..."
74
    echo "Downloading $MR1_URL..."
60
    wget $MR1_URL -O $MR1_CACHE
75
    wget $MR1_URL -O $MR1_CACHE
61
  fi
76
  fi
62

   
77

   
... 12 lines hidden [Expand]
75
HIVE_URL=${HIVE_URL:-http://nightly.cloudera.com/cdh4/cdh/4/hive-0.9.0-cdh4.2.0-SNAPSHOT.tar.gz}
90
HIVE_URL=${HIVE_URL:-http://nightly.cloudera.com/cdh4/cdh/4/hive-0.9.0-cdh4.2.0-SNAPSHOT.tar.gz}
76

   
91

   
77
HIVE_TGZ=$(basename $HIVE_URL)
92
HIVE_TGZ=$(basename $HIVE_URL)
78
HIVE_VERSION=${HIVE_TGZ/.tar.gz/}
93
HIVE_VERSION=${HIVE_TGZ/.tar.gz/}
79
HIVE_CACHE="$HOME/.hue_cache/${HIVE_TGZ}"
94
HIVE_CACHE="$HOME/.hue_cache/${HIVE_TGZ}"

   
95
HIVE_MTIME_FILE="$HOME/.hue_cache/.hive_mtime"
80

   
96

   
81
build_hive() {
97
build_hive() {
82
  if [ ! -f $HIVE_CACHE ]; then
98
  if ! check_mtime ${HIVE_MTIME_FILE} ${HIVE_URL} || [ ! -f $HIVE_CACHE ]; then
83
    mkdir -p $HOME/.hue_cache
99
    mkdir -p $HOME/.hue_cache
84
    echo "Downloading $HIVE_URL..."
100
    echo "Downloading $HIVE_URL..."
85
    wget $HIVE_URL -O $HIVE_CACHE
101
    wget $HIVE_URL -O $HIVE_CACHE
86
  fi
102
  fi
87

   
103

   
... 11 lines hidden [Expand]
99
OOZIE_URL=${OOZIE_URL:-http://nightly.cloudera.com/cdh4/cdh/4/oozie-3.2.0-cdh4.2.0-SNAPSHOT.tar.gz}
115
OOZIE_URL=${OOZIE_URL:-http://nightly.cloudera.com/cdh4/cdh/4/oozie-3.2.0-cdh4.2.0-SNAPSHOT.tar.gz}
100

   
116

   
101
OOZIE_TGZ=$(basename $OOZIE_URL)
117
OOZIE_TGZ=$(basename $OOZIE_URL)
102
OOZIE_VERSION=${OOZIE_TGZ/.tar.gz/}
118
OOZIE_VERSION=${OOZIE_TGZ/.tar.gz/}
103
OOZIE_CACHE="$HOME/.hue_cache/${OOZIE_TGZ}"
119
OOZIE_CACHE="$HOME/.hue_cache/${OOZIE_TGZ}"

   
120
OOZIE_MTIME_FILE="$HOME/.hue_cache/.oozie_mtime"
104

   
121

   
105
build_oozie() {
122
build_oozie() {
106
  if [ ! -f $OOZIE_CACHE ]; then
123
  if [ ! -e $HOME/.hue_cache ]; then
107
    mkdir -p $HOME/.hue_cache
124
    mkdir -p $HOME/.hue_cache

   
125
  fi;

   
126

   

   
127
  if ! check_mtime ${OOZIE_MTIME_FILE} ${OOZIE_URL} || [ ! -f $OOZIE_CACHE ]; then
108
    echo "Downloading $OOZIE_URL..."
128
    echo "Downloading $OOZIE_URL..."
109
    wget $OOZIE_URL -O $OOZIE_CACHE
129
    wget $OOZIE_URL -O $OOZIE_CACHE
110
  fi
130
  fi
111

   
131

   
112
  OOZIE_DIR=$HUE_ROOT/ext/oozie
132
  OOZIE_DIR=$HUE_ROOT/ext/oozie
... 20 lines hidden [Expand]
  1. tools/jenkins/build-functions: Loading...