aboutsummaryrefslogtreecommitdiff
path: root/tcwg-buildfarm.yaml
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-04-17 14:36:58 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-04-19 06:16:17 +0000
commitfa76022a6adf42528d85772efb105dff816ca269 (patch)
treea1ad953b7a1dd1725fb630f676b8a2782926918f /tcwg-buildfarm.yaml
parent1a6cf81146b3f6602817052877edf286ec087b70 (diff)
tcwg-buildfarm: Move code to jenkins-helpers.sh
Change-Id: I547af54ef702f7d950422f873128a5543f2135c4
Diffstat (limited to 'tcwg-buildfarm.yaml')
-rw-r--r--tcwg-buildfarm.yaml16
1 files changed, 3 insertions, 13 deletions
diff --git a/tcwg-buildfarm.yaml b/tcwg-buildfarm.yaml
index f953d3ec16..62c6b0b697 100644
--- a/tcwg-buildfarm.yaml
+++ b/tcwg-buildfarm.yaml
@@ -145,6 +145,7 @@
mkdir -p artifacts/
git clone -b $scripts_branch --depth 1 https://git-us.linaro.org/toolchain/jenkins-scripts
+ . ./jenkins-scripts/jenkins-helpers.sh
case ${label} in
tcwg-x86_64-build)
@@ -266,19 +267,8 @@
tester_labels="tcwg-tx1_64-test"
;;
esac
- testers=$(
- for label in $tester_labels; do
- wget -O - https://ci.linaro.org/label/$label/api/json?pretty=true 2>/dev/null | grep nodeName | cut -d: -f 2 | sed -e 's/"//g' -e "s/\$/.tcwglab/"
- done)
- tester_min_load_name=""
- tester_min_load_value="999"
- for tester in $testers; do
- load_value=$(docker -H $tester:2375 ps | wc -l)
- if [ $load_value -lt $tester_min_load_value ]; then
- tester_min_load_name=$tester
- tester_min_load_value=$load_value
- fi
- done
+
+ test_min_load_name=$(node_with_least_containers $tester_labels)
if [ x"$tester_min_load_name" = x"" ]; then
echo "ERROR: Cannot find tester for $test_container_arch"
exit 1