Closed Bug 1210467 Opened 9 years ago Closed 9 years ago

Exit build script if aws client fails

Categories

(Taskcluster :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla44

People

(Reporter: wcosta, Assigned: wcosta)

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
As the aws command line tool call is piped, its status is lost, but the
net result is an empty variable assigment. We take advantage of this to
detect errors in the aws tool.
Attachment #8668553 - Flags: review?(garndt)
Comment on attachment 8668553 [details] [diff] [review]
Exit script if aws fails to list backup file. r=garndt

Review of attachment 8668553 [details] [diff] [review]:
-----------------------------------------------------------------

::: testing/taskcluster/scripts/phone-builder/pre-build.sh
@@ +30,5 @@
>  if [ 0$B2G_DEBUG -ne 0 ]; then
>    debug_flag='--debug'
>  fi
>  
> +if ! aws --output=text s3 ls s3://b2g-phone-backups/$TARGET/; then

Hrm, does this work correctly for devices that dont' have a phone backup?
Attachment #8668553 - Flags: review?(garndt) → review+
Backed out http://hg.mozilla.org/integration/b2g-inbound/rev/e843ef367f35.

Broke nexus. BTW, just saw there is no nexus device on try.
Attachment #8668553 - Attachment is obsolete: true
Make a dummy call to aws client to make sure credentials are ok.
Comment on attachment 8668645 [details] [diff] [review]
Exit script if aws fails to list backup file. r=garndt

Review of attachment 8668645 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.
Attachment #8668645 - Flags: review?(garndt) → review+
r+ as long as this line won't cause issue if the backup doesn't exist:

 backup_file=$(aws --output=text s3 ls s3://b2g-phone-backups/$TARGET/ | tail -1 | awk '{print $NF}')
https://hg.mozilla.org/mozilla-central/rev/48ea67571aac
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: