alexellis / arkade

Open Source Marketplace For Developer Tools
https://blog.alexellis.io/kubernetes-marketplace-two-year-update/
MIT License
4.25k stars 289 forks source link

Move Hashicorp tools to GH Version Strategy #1065

Closed rgee0 closed 6 months ago

rgee0 commented 6 months ago

Description

Hashicorp tools were fixed at a version and had been called out in issues for being dated. This change moves all hashicorp tools, except for vagrant, to the githubversionstrategy for determining latest.

Also included are:

Motivation and Context

Hashicorp issues have been raised previously and change aligns with the version strategy approach to determining versions.

How Has This Been Tested?

Functional for Hashicorp tools

➜  arkade git:(hashicorp) make build                                                 
go build
➜  arkade git:(hashicorp) ./arkade get terraform                                     
Downloading: terraform
2024/05/11 09:00:18 Looking up version for terraform
2024/05/11 09:00:18 Found: v1.8.3
Downloading: https://releases.hashicorp.com/terraform/1.8.3/terraform_1.8.3_darwin_amd64.zip
26.36 MiB / 26.36 MiB [---------------------------------------------------------------------------------------------] 100.00%
/var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-1040516841/terraform_1.8.3_darwin_amd64.zip written.
Name: terraform_1.8.3_darwin_amd64.zip, size: 276375392024/05/11 09:00:22 Extracted: /var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-1040516841/terraform
2024/05/11 09:00:22 Copying /var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-1040516841/terraform to /Users/rgee0/.arkade/bin/terraform

Wrote: /Users/rgee0/.arkade/bin/terraform (91.01MB)

➜  arkade git:(hashicorp) ./arkade get packer                                        
Downloading: packer
2024/05/11 09:00:31 Looking up version for packer
2024/05/11 09:00:31 Found: v1.10.3
Downloading: https://releases.hashicorp.com/packer/1.10.3/packer_1.10.3_darwin_amd64.zip
16.21 MiB / 16.21 MiB [---------------------------------------------------------------------------------------------] 100.00%
/var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-1576988151/packer_1.10.3_darwin_amd64.zip written.
Name: packer_1.10.3_darwin_amd64.zip, size: 170018342024/05/11 09:00:33 Extracted: /var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-1576988151/packer
2024/05/11 09:00:33 Copying /var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-1576988151/packer to /Users/rgee0/.arkade/bin/packer

Wrote: /Users/rgee0/.arkade/bin/packer (58.03MB)

➜  arkade git:(hashicorp) ./arkade get waypoint                                      
Downloading: waypoint
2024/05/11 09:00:38 Looking up version for waypoint
2024/05/11 09:00:38 Found: v0.11.4
Downloading: https://releases.hashicorp.com/waypoint/0.11.4/waypoint_0.11.4_darwin_amd64.zip
83.73 MiB / 83.73 MiB [---------------------------------------------------------------------------------------------] 100.00%
/var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-4275061740/waypoint_0.11.4_darwin_amd64.zip written.
Name: waypoint_0.11.4_darwin_amd64.zip, size: 87793018^[[A2024/05/11 09:00:47 Extracted: /var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-4275061740/waypoint
2024/05/11 09:00:47 Copying /var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-4275061740/waypoint to /Users/rgee0/.arkade/bin/waypoint

Wrote: /Users/rgee0/.arkade/bin/waypoint (166.6MB)

➜  arkade git:(hashicorp) ./arkade get vault                                         
Downloading: vault
2024/05/11 09:00:52 Looking up version for vault
2024/05/11 09:00:52 Found: v1.16.2
Downloading: https://releases.hashicorp.com/vault/1.16.2/vault_1.16.2_darwin_amd64.zip
143.87 MiB / 143.87 MiB [-------------------------------------------------------------------------------------------] 100.00%
/var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-3727998193/vault_1.16.2_darwin_amd64.zip written.
Name: vault_1.16.2_darwin_amd64.zip, size: 1508607732024/05/11 09:01:09 Extracted: /var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-3727998193/vault
2024/05/11 09:01:09 Copying /var/folders/3w/tv6429v51kl_61rd1fr25sgm0000gq/T/arkade-3727998193/vault to /Users/rgee0/.arkade/bin/vault

Wrote: /Users/rgee0/.arkade/bin/vault (425.6MB)

➜  arkade git:(hashicorp) 

make e2e

➜  arkade git:(hashicorp) make e2e
...
PASS
coverage: 61.1% of statements
ok      github.com/alexellis/arkade/pkg/get     15.964s coverage: 61.1% of statements

test-tool.sh popeye

➜  arkade git:(hashicorp) go build && ./hack/test-tool.sh popeye
+ ./arkade get popeye --arch arm64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/popeye
/Users/rgee0/.arkade/bin/popeye: Mach-O 64-bit executable arm64
+ rm /Users/rgee0/.arkade/bin/popeye
+ echo

+ ./arkade get popeye --arch x86_64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/popeye
/Users/rgee0/.arkade/bin/popeye: Mach-O 64-bit executable x86_64
+ rm /Users/rgee0/.arkade/bin/popeye
+ echo

+ ./arkade get popeye --arch x86_64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/popeye
/Users/rgee0/.arkade/bin/popeye: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=mcvIB1SKQnwjlitRzVX6/6cB1ltvpIUQoAtUyhriZ/0PZ7H2RJJo4NQWkItLPf/OT1BaF-QFwY2s-oEOw1I, stripped
+ rm /Users/rgee0/.arkade/bin/popeye
+ echo

+ ./arkade get popeye --arch aarch64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/popeye
/Users/rgee0/.arkade/bin/popeye: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=7kL4hk19RKruiVgkbr5O/KSVHZD69pPcskfMIW3Q5/FYRl0PrEDRF1Z-bLZIhA/i9vGZtiS30vs0g66Gyrt, stripped
+ rm /Users/rgee0/.arkade/bin/popeye
+ echo

+ ./arkade get popeye --arch x86_64 --os mingw --quiet
+ file /Users/rgee0/.arkade/bin/popeye.exe
/Users/rgee0/.arkade/bin/popeye.exe: PE32+ executable (console) x86-64, for MS Windows
+ rm /Users/rgee0/.arkade/bin/popeye.exe
+ echo

test-tool.sh atuin (windows binary unavailable)

➜  arkade git:(hashicorp) go build && ./hack/test-tool.sh atuin 
+ ./arkade get atuin --arch arm64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/atuin
/Users/rgee0/.arkade/bin/atuin: Mach-O 64-bit executable arm64
+ rm /Users/rgee0/.arkade/bin/atuin
+ echo

+ ./arkade get atuin --arch x86_64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/atuin
/Users/rgee0/.arkade/bin/atuin: Mach-O 64-bit executable x86_64
+ rm /Users/rgee0/.arkade/bin/atuin
+ echo

+ ./arkade get atuin --arch x86_64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/atuin
/Users/rgee0/.arkade/bin/atuin: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=e45afc608ce46f90ba0392b7f2edc0122bbd4ee5, for GNU/Linux 3.2.0, stripped
+ rm /Users/rgee0/.arkade/bin/atuin
+ echo

+ ./arkade get atuin --arch aarch64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/atuin
/Users/rgee0/.arkade/bin/atuin: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=ff572ad717d266e67e156ba02ae1fb538bb19d4c, for GNU/Linux 3.7.0, stripped
+ rm /Users/rgee0/.arkade/bin/atuin
+ echo

+ ./arkade get atuin --arch x86_64 --os mingw --quiet

The requested version of atuin is not available or configured in arkade for mingw/x86_64

* Check if a binary is available from the project for your Operating System
* View the atuin releases page: https://github.com/atuinsh/atuin/releases
* Feel free to raise an issue at https://github.com/alexellis/arkade/issues for help

Error: server returned status: 404

test-tool.sh terraform

➜  arkade git:(hashicorp) go build && ./hack/test-tool.sh terraform
+ ./arkade get terraform --arch arm64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/terraform
/Users/rgee0/.arkade/bin/terraform: Mach-O 64-bit executable arm64
+ rm /Users/rgee0/.arkade/bin/terraform
+ echo

+ ./arkade get terraform --arch x86_64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/terraform
/Users/rgee0/.arkade/bin/terraform: Mach-O 64-bit executable x86_64
+ rm /Users/rgee0/.arkade/bin/terraform
+ echo

+ ./arkade get terraform --arch x86_64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/terraform
/Users/rgee0/.arkade/bin/terraform: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=CpQmWceVi6IG07QhDVDA/-PNr21IQMN6lBUo_oYNE/b1jkmskH-RIPSk7op7z7/ymMG1spInI3R34m3YFWU, stripped
+ rm /Users/rgee0/.arkade/bin/terraform
+ echo

+ ./arkade get terraform --arch aarch64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/terraform
/Users/rgee0/.arkade/bin/terraform: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=q2B1pSQ4KezkSCDw_rEx/EseGQP_fMgTQCLgE7Knn/zZ7dIputq3WkbGQSV71Y/gBhf2m1vUTB6XpcZEOJm, stripped
+ rm /Users/rgee0/.arkade/bin/terraform
+ echo

+ ./arkade get terraform --arch x86_64 --os mingw --quiet
+ file /Users/rgee0/.arkade/bin/terraform.exe
/Users/rgee0/.arkade/bin/terraform.exe: PE32+ executable (console) x86-64, for MS Windows
+ rm /Users/rgee0/.arkade/bin/terraform.exe
+ echo

test-tool.sh packer

➜  arkade git:(hashicorp) go build && ./hack/test-tool.sh packer
+ ./arkade get packer --arch arm64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/packer
/Users/rgee0/.arkade/bin/packer: Mach-O 64-bit executable arm64
+ rm /Users/rgee0/.arkade/bin/packer
+ echo

+ ./arkade get packer --arch x86_64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/packer
/Users/rgee0/.arkade/bin/packer: Mach-O 64-bit executable x86_64
+ rm /Users/rgee0/.arkade/bin/packer
+ echo

+ ./arkade get packer --arch x86_64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/packer
/Users/rgee0/.arkade/bin/packer: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=qBll5cF0bleQ7CIOP4rb/CcP_DLU0ohrkWFvg0IKa/6vgl_OY_PsLYNKom1XlO/EAh_O_eq9Pb29KGQ8ag8, stripped
+ rm /Users/rgee0/.arkade/bin/packer
+ echo

+ ./arkade get packer --arch aarch64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/packer
/Users/rgee0/.arkade/bin/packer: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=vLexrhO6-vU6QWQ_Dx3d/XQtlggEBF5lz8ZzxKSVF/NXu7L6WjDXsiL_TrcQ5Y/F_PINxkktX8eR6lr82x5, stripped
+ rm /Users/rgee0/.arkade/bin/packer
+ echo

+ ./arkade get packer --arch x86_64 --os mingw --quiet
+ file /Users/rgee0/.arkade/bin/packer.exe
/Users/rgee0/.arkade/bin/packer.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
+ rm /Users/rgee0/.arkade/bin/packer.exe
+ echo

test-tool.sh waypoint

➜  arkade git:(hashicorp) go build && ./hack/test-tool.sh waypoint 
+ ./arkade get waypoint --arch arm64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/waypoint
/Users/rgee0/.arkade/bin/waypoint: Mach-O 64-bit executable arm64
+ rm /Users/rgee0/.arkade/bin/waypoint
+ echo

+ ./arkade get waypoint --arch x86_64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/waypoint
/Users/rgee0/.arkade/bin/waypoint: Mach-O 64-bit executable x86_64
+ rm /Users/rgee0/.arkade/bin/waypoint
+ echo

+ ./arkade get waypoint --arch x86_64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/waypoint
/Users/rgee0/.arkade/bin/waypoint: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=BjDrvGk2_OENbAmfM4_R/CGUUh7-1wMXER25McDxC/1i57FFiXSIruqmWnjvs4/5sdVBfZtWFZJDh6uvhYC, stripped
+ rm /Users/rgee0/.arkade/bin/waypoint
+ echo

+ ./arkade get waypoint --arch aarch64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/waypoint
/Users/rgee0/.arkade/bin/waypoint: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=Nsi8i0X2eROpyhD7qSbo/_QSuviOi4kfcoXVBELI9/LgPi6pJBqW3aWC35itaR/lGpvhE6Fy1W3NY5CfZhE, stripped
+ rm /Users/rgee0/.arkade/bin/waypoint
+ echo

+ ./arkade get waypoint --arch x86_64 --os mingw --quiet
+ file /Users/rgee0/.arkade/bin/waypoint.exe
/Users/rgee0/.arkade/bin/waypoint.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
+ rm /Users/rgee0/.arkade/bin/waypoint.exe
+ echo

test-tool.sh vault

➜  arkade git:(hashicorp) go build && ./hack/test-tool.sh vault   
+ ./arkade get vault --arch arm64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/vault
/Users/rgee0/.arkade/bin/vault: Mach-O 64-bit executable arm64
+ rm /Users/rgee0/.arkade/bin/vault
+ echo

+ ./arkade get vault --arch x86_64 --os darwin --quiet
+ file /Users/rgee0/.arkade/bin/vault
/Users/rgee0/.arkade/bin/vault: Mach-O 64-bit executable x86_64
+ rm /Users/rgee0/.arkade/bin/vault
+ echo

+ ./arkade get vault --arch x86_64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/vault
/Users/rgee0/.arkade/bin/vault: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=R-UprXiWgwFhw9ZPyTCB/ei9YtV00iXiAbLOHJfpw/WnT4g9jIg7t8mgaiAqjH/Xa6Q37z549d2OsFVEzam, with debug_info, not stripped
+ rm /Users/rgee0/.arkade/bin/vault
+ echo

+ ./arkade get vault --arch aarch64 --os linux --quiet
+ file /Users/rgee0/.arkade/bin/vault
/Users/rgee0/.arkade/bin/vault: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=gVdJb77RvWqjCKxkl319/EdX9xr-lGyXoUMrD44Xa/xYvxPEZRv3U2TfWz5GE0/EMe6C9w3uSQu9ZtmPYtt, with debug_info, not stripped
+ rm /Users/rgee0/.arkade/bin/vault
+ echo

+ ./arkade get vault --arch x86_64 --os mingw --quiet
+ file /Users/rgee0/.arkade/bin/vault.exe
/Users/rgee0/.arkade/bin/vault.exe: PE32+ executable (console) x86-64, for MS Windows
+ rm /Users/rgee0/.arkade/bin/vault.exe
+ echo

Types of changes

Documentation

Checklist: