Skip to main content
summaryrefslogtreecommitdiffstats
blob: 0eca4f9d7d152d78037f629aeb2d20d38e6f1730 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env bash

# Utility to be called from test data collection cron job,
# to invoke the main code. expected to be called with piped
# input, such as
# ./collect.sh < testjobs/testjobdata201210220811.txt

# Simple utility to run as cronjob to run Eclipse Platform builds
# Normally resides in $BUILD_HOME

# Start with minimal path for consistency across machines
# plus, cron jobs do not inherit an environment
# care is needed not have anything in ${HOME}/bin that would effect the build
# unintentionally, but is required to make use of "source localBuildProperties.shsource" on
# local machines.
# Likely only a "release engineer" would be interested, such as to override "SIGNING" (setting it
# to false) for a test I-build on a remote machine.
export PATH=/usr/local/bin:/usr/bin:/bin:${HOME}/bin
# unset common variables (some defined for e4Build) which we don't want (or, set ourselves)
unset JAVA_HOME
unset JAVA_ROOT
unset JAVA_JRE
unset CLASSPATH
unset JAVA_BINDIR
unset JRE_HOME

# 0002 is often the default for shell users, but it is not when ran from
# a cron job, so we set it explicitly, so releng group has write access to anything
# we create.
oldumask=`umask`
umask 0002
echo "umask explicitly set to 0002, old value was $oldumask"

# this localBuildProperties.shsource file is to ease local builds to override some variables.
# It should not be used for production builds.
source localBuildProperties.shsource 2>/dev/null
export BUILD_HOME=${BUILD_HOME:-/shared/eclipse/builds}

export JAVA_HOME=/shared/common/jdk1.8.0_x64-latest
export ANT_HOME=/shared/common/apache-ant-1.9.4

export PATH=${JAVA_HOME}/bin:${ANT_HOME}/bin:$PATH

read inputline
echo " = = Properties in collect.sh == "
echo "inputline: $inputline"

job="$(echo $inputline | cut -d\  -f1)"
buildNumber="$(echo $inputline | cut -d\  -f2)"
buildId="$(echo $inputline | cut -d\  -f3)"
eclipseStream="$(echo $inputline | cut -d\  -f4)"
EBUILDER_HASH="$(echo $inputline | cut -d\  -f5)"

echo "job: $job"
echo "buildNumber: $buildNumber"
echo "buildId: $buildId"
echo "eclipseStream: $eclipseStream"
echo "EBUILDER_HASH: $EBUILDER_HASH"

${ANT_HOME}/bin/ant -version
#       -lib /shared/common/apache-ant-1.9.2/lib/ \
  ${ANT_HOME}/bin/ant -f /shared/eclipse/sdk/collectTestResults.xml \
  -Djob=${job} \
  -DbuildNumber=${buildNumber} \
  -DbuildId=${buildId} \
  -DeclipseStream=${eclipseStream} \
  -DEBUILDER_HASH=${EBUILDER_HASH} \
  -DBUILD_HOME=${BUILD_HOME}

Back to the top