account for the possibility of there being no aws cli binary #1719
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
N/A
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
the generate-version-info.sh script presently assumes that the aws binary will be present. but this isn't always the case depending on the base AMI being used. allow for the possibility that we will not have an aws binary so the script doesn't error out.
otherwise we end up with errors like so:
2024-03-08T13:48:36-05:00: ==> amazon-ebs: Provisioning with shell script:
/home/jo.diaz/projects/amazon-eks-ami/templates/al2/../shared/provisioners/generate-version-info.sh
2024-03-08T13:48:37-05:00: amazon-ebs:
/home/ec2-user/script_1364.sh: line 26: aws: command not found
2024-03-08T13:48:37-05:00: ==> amazon-ebs: Provisioning step had errors:
Running the cleanup provisioner, if present...
2024-03-08T13:48:37-05:00: ==> amazon-ebs: Terminating the source AWS
instance...
Testing Done
Ran a build with a base AMI that didn't include the aws CLI w/o running into this issue.