Skip to content

Commit

Permalink
feat: add openshift/rosa to tools
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Gee <[email protected]>
  • Loading branch information
rgee0 authored and alexellis committed Nov 5, 2024
1 parent 49a75a2 commit 3595b71
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ There are 52 apps that you can install on your cluster.
| [regctl](https://github.com/regclient/regclient) | Utility for accessing docker registries |
| [rekor-cli](https://github.com/sigstore/rekor) | Secure Supply Chain - Transparency Log |
| [replicated](https://github.com/replicatedhq/replicated) | CLI for interacting with the Replicated Vendor API |
| [rosa](https://github.com/openshift/rosa) | Red Hat OpenShift on AWS (ROSA) command line tool |
| [rpk](https://github.com/redpanda-data/redpanda) | Kafka compatible streaming platform for mission critical workloads. |
| [run-job](https://github.com/alexellis/run-job) | Run a Kubernetes Job and get the logs when it's done. |
| [scaleway-cli](https://github.com/scaleway/scaleway-cli) | Scaleway CLI is a tool to help you pilot your Scaleway infrastructure directly from your terminal. |
Expand Down Expand Up @@ -917,6 +918,6 @@ There are 52 apps that you can install on your cluster.
| [yq](https://github.com/mikefarah/yq) | Portable command-line YAML processor. |
| [yt-dlp](https://github.com/yt-dlp/yt-dlp) | Fork of youtube-dl with additional features and fixes |

There are 158 tools, use `arkade get NAME` to download one.
There are 159 tools, use `arkade get NAME` to download one.

> Note to contributors, run `go build && ./arkade get --format markdown` to generate this list
56 changes: 56 additions & 0 deletions pkg/get/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8020,3 +8020,59 @@ func Test_Crossplane(t *testing.T) {
}

}

func Test_Download_rosa(t *testing.T) {
tools := MakeTools()
name := "rosa"
const toolVersion = "v1.2.46"

tool := getTool(name, tools)

tests := []test{
{
os: "darwin",
arch: arch64bit,
version: toolVersion,
url: "https://github.com/openshift/rosa/releases/download/v1.2.46/rosa_Darwin_x86_64.tar.gz",
},
{
os: "darwin",
arch: archDarwinARM64,
version: toolVersion,
url: "https://github.com/openshift/rosa/releases/download/v1.2.46/rosa_Darwin_arm64.tar.gz",
},
{
os: "linux",
arch: arch64bit,
version: toolVersion,
url: "https://github.com/openshift/rosa/releases/download/v1.2.46/rosa_Linux_x86_64.tar.gz",
},
{
os: "linux",
arch: archARM64,
version: toolVersion,
url: "https://github.com/openshift/rosa/releases/download/v1.2.46/rosa_Linux_arm64.tar.gz",
},
{
os: "mingw64_nt-10.0-18362",
arch: arch64bit,
version: toolVersion,
url: "https://github.com/openshift/rosa/releases/download/v1.2.46/rosa_Windows_x86_64.zip",
},
{
os: "mingw64_nt-10.0-18362",
arch: archARM64,
version: toolVersion,
url: "https://github.com/openshift/rosa/releases/download/v1.2.46/rosa_Windows_arm64.zip",
},
}
for _, tc := range tests {
got, err := tool.GetURL(tc.os, tc.arch, tc.version, false)
if err != nil {
t.Fatal(err)
}
if got != tc.url {
t.Fatalf("\nwant: %s\ngot: %s", tc.url, got)
}
}
}
29 changes: 29 additions & 0 deletions pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -4353,5 +4353,34 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}
https://releases.crossplane.io/stable/{{.Version}}/bin/{{$os}}_{{$arch}}/crank{{$ext}}`,
})

tools = append(tools,
Tool{
Owner: "openshift",
Repo: "rosa",
Name: "rosa",
VersionStrategy: GitHubVersionStrategy,
Description: "Red Hat OpenShift on AWS (ROSA) command line tool",
BinaryTemplate: `
{{$os := .OS}}
{{$arch := .Arch}}
{{$ext := "tar.gz"}}
{{- if eq .OS "darwin" -}}
{{$os = "Darwin"}}
{{- else if eq .OS "linux" -}}
{{$os = "Linux"}}
{{- else if HasPrefix .OS "ming" -}}
{{$os = "Windows"}}
{{$ext = "zip"}}
{{- end -}}
{{- if (or (eq .Arch "aarch64") (eq .Arch "arm64")) -}}
{{$arch = "arm64"}}
{{- end -}}
rosa_{{$os}}_{{$arch}}.{{$ext}}
`,
})
return tools
}

0 comments on commit 3595b71

Please sign in to comment.