summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2015-05-05 14:26:55 +0300
committerRiku Voipio <riku.voipio@linaro.org>2015-05-05 14:26:55 +0300
commitd77904b9ff79079895bef7a1081a25065b43c638 (patch)
tree2a2e57667bebfd1f755257fe1e5001e163349d5a
parent7fc56ad2b304cd9fe11482b052e67b9fcd06cb6f (diff)
attempt to support matrix job paths better
-rwxr-xr-xjenkins-dput52
1 files changed, 27 insertions, 25 deletions
diff --git a/jenkins-dput b/jenkins-dput
index d838c63..7588747 100755
--- a/jenkins-dput
+++ b/jenkins-dput
@@ -17,34 +17,36 @@ echo "Source URL: ${pkg_url}"
set +e
job_path=/var/lib/jenkins/jobs/${pkg_job_name}/workspace/
-ls -l ${job_path}
-find /var/lib/jenkins/jobs/generic-package-builder/workspace/ -ls||true
+job_path_axis=`echo $job_path|sed -e 's,/label=,/configurations/axis-label/,'`
+tmp=`echo ${pkg_job_name}|sed -e 's,/,/workspace/,' -e 's,=,/,'`
+job_path_matrix=/var/lib/jenkins/jobs/${pkg_job_name}/workspace/
-if [ -r ${job_path}/${pkg_changes} ]
-then
- cd ${job_path}
-else
- job_path=`echo $job_path|sed -e 's,/label=,/configurations/axis-label/,'`
- if [ -r ${job_path}/${pkg_changes} ]
+for path in $job_path $job_path_axis $job_path_matrix
+do
+ if [ -r ${path}/${pkg_changes} ]
then
- cd ${job_path}
- else
- timeout=5
- set +e
- while [ true ]; do
- wget --no-check-certificate --progress=dot -e dotbytes=1M ${pkg_url}/${pkg_changes}
- [ -r ${pkg_changes} ] && break
- sleep 60
- timeout=$((timeout - 1))
- [ $timeout -eq 0 ] && break
- done
- set -e
-
- for file in `${TOOLS}/dcmd ${pkg_changes}`
- do
- wget --no-check-certificate --progress=dot -e dotbytes=1M ${pkg_url}/${file}
- done
+ cd ${path}
+ break
fi
+done
+
+if [ ! -r ${pkg_changes}]
+then
+ timeout=5
+ set +e
+ while [ true ]; do
+ wget --no-check-certificate --progress=dot -e dotbytes=1M ${pkg_url}/${pkg_changes}
+ [ -r ${pkg_changes} ] && break
+ sleep 60
+ timeout=$((timeout - 1))
+ [ $timeout -eq 0 ] && break
+ done
+ set -e
+
+ for file in `${TOOLS}/dcmd ${pkg_changes}`
+ do
+ wget --no-check-certificate --progress=dot -e dotbytes=1M ${pkg_url}/${file}
+ done
fi
ls -la .