diff options
Diffstat (limited to 'jenkins-helpers.sh')
-rw-r--r-- | jenkins-helpers.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh index a55cec14..65428d9a 100644 --- a/jenkins-helpers.sh +++ b/jenkins-helpers.sh @@ -64,10 +64,18 @@ print_nodes_in_labels () local labels="$@" local label + local tmpfile=$(mktemp) for label in $labels; do - wget --retry-connrefused --waitretry=1 -O - https://ci.linaro.org/label/$label/api/json?pretty=true 2>/dev/null | grep nodeName | cut -d: -f 2 | sed -e 's/"//g' + # Handle gracefully the case where the label contains no + # machine: we don't want to generate an error, rather return + # an empty string. Use a tmp file so that we still generate an + # error in case wget fails. + wget --retry-connrefused --waitretry=1 -O - https://ci.linaro.org/label/$label/api/json?pretty=true 2>/dev/null > $tmpfile + grep nodeName $tmpfile | cut -d: -f 2 | sed -e 's/"//g' || true done + + rm $tmpfile ) } @@ -675,9 +683,9 @@ print_volume_mounts () local volume_id case "$job" in - tcwg_kernel-*|tcwg_bmk-*) - # Add ccache volume for tcwg_kernel jobs. These jobs - # depend on ccache for fast rebuilds of LLVM and GCC with + tcwg_*-*) + # Add ccache volume for tcwg_* jobs. + # These jobs depend on ccache for fast rebuilds of LLVM and GCC with # the host compiler. job="$(echo $job | cut -d- -f 1)" volume_id=$(print_docker_name "$job$suffix") |