diff options
author | 2017-11-30 10:56:54 +0100 | |
---|---|---|
committer | 2017-11-30 11:00:48 +0100 | |
commit | 0219f5537c874fe92529cca26b8ee52b686489d5 (patch) | |
tree | bebcaab580e9e94b29122885ccebc5080a7f5236 /jjb/common | |
parent | 4c23c40c069440a065065843b3cba1c0190d3f0e (diff) |
jjb/common/lava-labs-prepare: LAVA fail gracefully if device not found
When LAVA labs are offline, or otherwise unavailable,
"lava-tool devices-list" fails causing the whole job to fail.
Detect this error earlier when trying to add the authentication and skip
the lab if offline.
If the device was not found in any lab, exit with success.
JIRA: SPEC-1142
Change-Id: Ia2cdeea3da8ade7feb5962e0898f40e59ca9cfdb
Signed-off-by: lollivier <lollivier@baylibre.com>
Diffstat (limited to 'jjb/common')
-rw-r--r-- | jjb/common/include-agl-lava-labs-prepare.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jjb/common/include-agl-lava-labs-prepare.sh b/jjb/common/include-agl-lava-labs-prepare.sh index 3c0c73a3..aab5eb3d 100644 --- a/jjb/common/include-agl-lava-labs-prepare.sh +++ b/jjb/common/include-agl-lava-labs-prepare.sh @@ -81,6 +81,7 @@ for lab in "${!labs[@]}"; do lava-tool auth-add --token $token_file $full_url if [ $? != 0 ]; then echo "ERROR: Lab ${lab}: lava-tool auth-add failed." + continue fi rm -f $token_file @@ -117,5 +118,5 @@ done if [ "$device_available" -eq 0 ]; then echo "" echo "ERROR: device not found in any available lab." - exit 1 + exit 0 fi |