lava-labs-prepare: Fix lavacli auth add error 49/20549/1
authorLoys Ollivier <lollivier@baylibre.com>
Mon, 11 Mar 2019 13:05:11 +0000 (14:05 +0100)
committerLoys Ollivier <lollivier@baylibre.com>
Mon, 11 Mar 2019 13:05:11 +0000 (14:05 +0100)
lavacli is returning an error if the config file for adding identities does
not exist.
Create the file before using `lavacli auth add`

Change-Id: I3928355055299ddbdd1d269d74a762a563577fb8
Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
jjb/common/include-agl-lava-labs-prepare.sh

index 893c859..2335b0a 100644 (file)
@@ -70,6 +70,7 @@ for lab in "${!labs[@]}"; do
     rm -f $token_file
 
     # lavacli auth using token
+    mkdir -p ~/.config && touch ~/.config/lavacli.yaml
     lavacli identities add --token ${token} --uri $full_url --username $user $lab
 
     # lavacli: Find the LAVA lab that has the device available to run the job