Skip to content

Commit

Permalink
pin device to release
Browse files Browse the repository at this point in the history
change-type: patch
  • Loading branch information
ab77 committed Nov 14, 2023
1 parent 4bcd68d commit 3a5bfa8
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions resources/resincli.robot
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,23 @@ Get "${device_info}" of device "${device_uuid}"
Process ${result}
[Return] ${result.stdout}

Get "${application_info}" from application "${application_name}"
Get "${application_info}" from fleet "${application_name}"
[Documentation] Available values for argument ${application_info} are:
... ID, APP_NAME, DEVICE_TYPE, ONLINE_DEVICES, DEVICES_LENGTH
&{dictionary} = Create Dictionary ID=1 APP_NAME=2 DEVICE_TYPE=3 ONLINE_DEVICES=4 DEVICES_LENGTH=5
${result} = Run Process balena apps | grep -w "${application_name}" | awk '{print $${dictionary.${application_info}}}' shell=yes
&{dictionary} = Create Dictionary ID=1 APP_NAME=2 SLUG=3 DEVICE_TYPE=4 DEVICES_LENGTH=5 ONLINE_DEVICES=6
${result} = Run Process balena fleets | grep -w "${application_name}" | awk '{print $${dictionary.${application_info}}}' shell=yes
Process ${result}
[Return] ${result.stdout}

# FIXME: needs to select STATUS=success and IS FINAL=true
Get latest release from fleet "${application_name}"
${result} = Run Process balena releases "${application_name}" | head -n 2 | tail -n 1 | awk '{print $2}' shell=yes
Process ${result}
[Return] ${result.stdout}

# FIXME: needs to select STATUS=success and IS FINAL=true
Get previous release from fleet "${application_name}"
${result} = Run Process balena releases "${application_name}" | head -n 3 | tail -n 2 | tail -n 1 | awk '{print $2}' shell=yes
Process ${result}
[Return] ${result.stdout}

Expand Down

0 comments on commit 3a5bfa8

Please sign in to comment.