lf-display-node-uuid: Do not fail on static slaves 08/1608/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 18 Sep 2019 10:46:28 +0000 (12:46 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 18 Sep 2019 10:46:28 +0000 (12:46 +0200)
Not all Jenkins slaves are Openstack instances, which will obviously
break the jobs trying to print the node's UUID.
So make the UUID querying non-critical.

Fixes: a919490352dbd01f08d0b78e935ef90778c77dff

Change-Id: I1bb7f3414c18e2477a2b7bb55bd242c06431f614
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
jjb/akraino-templates/akraino-ta-common-macros.yaml

index f750e29..8b3f331 100644 (file)
@@ -81,7 +81,7 @@
     builders:
         - shell: |2-
             echo "---> Node UUID:"
-            curl -s http://169.254.169.254/openstack/latest/meta_data.json | python -c 'import sys, json; data = json.load(sys.stdin); print(data["uuid"])'
+            curl -s http://169.254.169.254/openstack/latest/meta_data.json | python -c 'import sys, json; data = json.load(sys.stdin); print(data["uuid"])' || true
 
 - builder:
     name: ta-builder-tox