summaryrefslogtreecommitdiff
path: root/jenkins.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2016-02-09 14:27:21 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2016-03-18 11:04:53 +0000
commitec0ddc5c10c0f8d65f10c066d50976d5d4ad040e (patch)
treea3db58d2fb452f7698cc1f4df12279fcb733fad1 /jenkins.sh
parent43d8fb6a35a6b5d84bb94cba3e7cb86fa662a2f3 (diff)
Add jenkins.sh "--override" option
... to specify non-default versions for glibc and other components. Change-Id: I7322c7fd624135d7551b1da3e2afd217e1dfebd6
Diffstat (limited to 'jenkins.sh')
-rwxr-xr-xjenkins.sh32
1 files changed, 13 insertions, 19 deletions
diff --git a/jenkins.sh b/jenkins.sh
index 63db8a2b..8142e267 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -52,8 +52,8 @@ shared="${HOME}/workspace/shared"
# This is an optional directory for the reference copy of the git repositories.
git_reference="${HOME}/snapshots-ref"
-# GCC branch to build
-gcc_branch="latest"
+# Override default versions of components
+change=""
# set default values for options to make life easier
user_snapshots="${user_workspace}/snapshots"
@@ -65,7 +65,7 @@ fileserver="ex40-01.tcwglab.linaro.org/snapshots-ref"
logserver=""
# Template of logs' directory name
-logname='${job}${BUILD_NUMBER}-${branch}/${arch}.${target}'
+logname=""
# Compiler languages to build
languages=default
@@ -92,10 +92,13 @@ excludecheck_opt=""
# --logname gcc-<sha1>
rebuild=true
-OPTS="`getopt -o s:g:c:w:o:f:l:rt:b:h -l gcc-branch:,snapshots:,gitrepo:,abe:,workspace:,options:,fileserver:,logserver:,logname:,languages:,runtests,target:,bootstrap,help,excludecheck:,norebuild -- "$@"`"
+orig_parameters="$@"
+
+OPTS="`getopt -o s:g:c:w:o:f:l:rt:b:h -l override:,gcc-branch:,snapshots:,gitrepo:,abe:,workspace:,options:,fileserver:,logserver:,logname:,languages:,runtests,target:,bootstrap,help,excludecheck:,norebuild -- "$@"`"
while test $# -gt 0; do
case $1 in
- --gcc-branch) gcc_branch=$2; shift ;;
+ --gcc-branch) change="$change gcc=$2"; shift ;;
+ --override) change="$change $2"; shift ;;
-s|--snapshots) user_snapshots=$2; shift ;;
-g|--gitrepo) git_reference=$2; shift ;;
-c|--abe) abe_dir=$2; shift ;;
@@ -124,21 +127,12 @@ else
job="`echo ${JOB_NAME} | cut -d '/' -f 1`"
fi
-# Get the version of GCC we're supposed to build
-change=""
-if test x"${gcc_branch}" = x""; then
- echo "ERROR: Empty value passed to --gcc-branch."
- echo "Maybe you meant to pass '--gcc-branch latest' ?"
- exit 1
-else
- if test x"${gcc_branch}" != x"latest"; then
- change="${change} gcc=${gcc_branch}"
- fi
- branch="`echo ${gcc_branch} | cut -d '~' -f 2 | sed -e 's:\.tar\.xz::'`"
-fi
-
arch="`uname -m`"
+if [ x"$logserver" = x"" -a x"$logname" != x"" ]; then
+ echo "ERROR: \$logname is not provided, but \$logserver is set to $logserver"
+ exit 1
+fi
# Now that all variables from $logname template are known, calculate log dir.
eval dir="$logname"
@@ -399,7 +393,7 @@ if test x"${BUILD_USER_LAST_NAME}" != x; then
requestor="${requestor}.${BUILD_USER_LAST_NAME}"
fi
-echo "Build by ${requestor} on ${NODE_NAME} for branch ${branch}"
+echo "Build by ${requestor} on ${NODE_NAME} with parameters: $orig_parameters"
manifest="`find ${user_workspace}/_build/builds/ -name destdir -prune -o -name \*manifest.txt -print`"
if test x"${manifest}" != x; then