arkade
arkade copied to clipboard
Add AWS CLI to `system install` tools
Description
This PR attempts to add support for downloading and installing the AWS CLI for supported platforms. This turned out to be a bit more difficult with the special requirements for each platform supported (Linux, MacOS, Windows).
Motivation and Context
Fixes a currently open issue - https://github.com/alexellis/arkade/issues/941
How Has This Been Tested?
Changes tested with:
gofmt -w -s ./pkg
gofmt -w -s ./cmd
go build
make test
make e2e
If updating or adding a new CLI to arkade get
, run:
go build && ./hack/test-tool.sh TOOL_NAME
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Documentation
- [ ] I have updated the list of tools in README.md if (required) with
./arkade get --format markdown
- [x] I have updated the list of apps in README.md if (required) with
./arkade install --help
Checklist:
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I've read the CONTRIBUTION guide
- [x] I have signed-off my commits with
git commit -s
- [x] I have tested this on arm, or have added code to prevent deployment
(I've added a boolean flag --run-installer
which defaults to false)
@Jasstkn would you be able to take a look at the approach?
@Jasstkn would you be able to take a look at the approach?
sure, will take a look. In the meantime, @VariableExp0rt can I ask you to add a confirmation how you tested the installation via arkade?
@Jasstkn I tested via arkade system install aws-cli
(I haven't tested on the other platforms, as I'm primarily operating on a Mac and don't have access to a Windows box). If the approach is a bit wrong, I can re-do it, the installer stuff AWS provide is a bit messy
Hey @Jasstkn, let me know if there is anything else you need from me :)
Thank you for your contribution. It seems that one or more of your commits have a "Signed-off-by" statement with an anonymous email address. The Developer Certificate of Origin (DCO) requires all commits to be signed off by genuine, contactable individuals. Please see our contributing guide.
### :bulb: Shall we fix this?
This will only take a few moments.
First, clone your fork and checkout this branch using the git CLI.
Next, set up your real name and email address:
git config --global user.name "Your Full Name"
git config --global user.email "[email protected]"
Finally, run one of these commands to add the "Signed-off-by" line to your commits.
If you only have one commit so far then run: git commit --amend --signoff
and then git push --force
.
If you have multiple commits, watch this video.
Check that the message has been added properly by running "git log".
Looks promising.
Please don't forget to update the README.md and squash the commits in to single one, we like to keep the git history clean for single tools like this.
Thanks!
Have updated the README.md here 👍 .
@Shikachuu I'm having quite a bit of trouble squashing into a single commit right now, is there a correct way I should be doing that other than git rebase -i HEAD~7
and squash
-ing my commits? I think the previous rebase is making things awkward
@Shikachuu I think I've managed to fix it, sorry about that! Let me know if there are any more comments to address 👍
For posterity:
./hack/test-tool.sh awscli
+ ./arkade get awscli --arch arm64 --os darwin --quiet
+ file /Users/liam.baker/.arkade/bin/awscli
/Users/liam.baker/.arkade/bin/awscli: xar archive compressed TOC: 4792, SHA-1 checksum
+ rm /Users/liam.baker/.arkade/bin/awscli
+ echo
+ ./arkade get awscli --arch x86_64 --os darwin --quiet
+ file /Users/liam.baker/.arkade/bin/awscli
/Users/liam.baker/.arkade/bin/awscli: xar archive compressed TOC: 4792, SHA-1 checksum
+ rm /Users/liam.baker/.arkade/bin/awscli
+ echo
+ ./arkade get awscli --arch x86_64 --os linux --quiet
+ file /Users/liam.baker/.arkade/bin/awscli
/Users/liam.baker/.arkade/bin/awscli: Zip archive data, at least v2.0 to extract, compression method=store
+ rm /Users/liam.baker/.arkade/bin/awscli
+ echo
+ ./arkade get awscli --arch aarch64 --os linux --quiet
+ file /Users/liam.baker/.arkade/bin/awscli
/Users/liam.baker/.arkade/bin/awscli: Zip archive data, at least v2.0 to extract, compression method=store
+ rm /Users/liam.baker/.arkade/bin/awscli
+ echo
+ ./arkade get awscli --arch x86_64 --os mingw --quiet
+ file /Users/liam.baker/.arkade/bin/awscli.exe
/Users/liam.baker/.arkade/bin/awscli.exe: Composite Document File V2 Document, Little Endian, Os: Windows, Version 6.2, MSI Installer, Code page: 1252, Title: Installation Database, Subject: AWS Command Line Interface v2, Author: Amazon Web Services, Keywords: Installer, Comments: This installer database contains the logic and data required to install AWS Command Line Interface v2., Template: x64;1033, Revision Number: {568A8D9E-6206-47B9-8AF8-EA26143A52B8}, Create Time/Date: Fri Oct 20 19:03:24 2023, Last Saved Time/Date: Fri Oct 20 19:03:24 2023, Number of Pages: 200, Number of Words: 2, Name of Creating Application: Windows Installer XML Toolset (3.11.1.2318), Security: 2
+ rm /Users/liam.baker/.arkade/bin/awscli.exe
+ echo
@Shikachuu is there anything else I should do here?