Skip to content

Commit

Permalink
add support for regctl
Browse files Browse the repository at this point in the history
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
  • Loading branch information
nitishkumar71 authored and alexellis committed Mar 20, 2024
1 parent acb1bd9 commit 6cf4a64
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,7 @@ There are 56 apps that you can install on your cluster.
| [popeye](https://github.com/derailed/popeye) | Scans live Kubernetes cluster and reports potential issues with deployed resources and configurations. |
| [porter](https://github.com/getporter/porter) | With Porter you can package your application artifact, tools, etc. as a bundle that can distribute and install. |
| [promtool](https://github.com/prometheus/prometheus) | Prometheus rule tester and debugging utility |
| [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 |
| [rpk](https://github.com/redpanda-data/redpanda) | Kafka compatible streaming platform for mission critical workloads. |
Expand All @@ -892,7 +893,6 @@ There are 56 apps that you can install on your cluster.
| [task](https://github.com/go-task/task) | A simple task runner and build tool |
| [tctl](https://github.com/temporalio/tctl) | Temporal CLI. |
| [terraform](https://github.com/hashicorp/terraform) | Infrastructure as Code for major cloud providers. |
| [opentofu](https://github.com/opentofu/opentofu) | OpenTofu lets you declaratively manage your cloud infrastructure. |
| [terraform-docs](https://github.com/terraform-docs/terraform-docs) | Generate documentation from Terraform modules in various output formats. |
| [terragrunt](https://github.com/gruntwork-io/terragrunt) | Terragrunt is a thin wrapper for Terraform that provides extra tools for working with multiple Terraform modules |
| [terrascan](https://github.com/tenable/terrascan) | Detect compliance and security violations across Infrastructure as Code. |
Expand All @@ -901,6 +901,7 @@ There are 56 apps that you can install on your cluster.
| [tilt](https://github.com/tilt-dev/tilt) | A multi-service dev environment for teams on Kubernetes. |
| [timoni](https://github.com/stefanprodan/timoni) | A package manager for Kubernetes powered by CUE. |
| [tkn](https://github.com/tektoncd/cli) | A CLI for interacting with Tekton. |
| [tofu](https://github.com/opentofu/opentofu) | OpenTofu lets you declaratively manage your cloud infrastructure |
| [trivy](https://github.com/aquasecurity/trivy) | Vulnerability Scanner for Containers and other Artifacts, Suitable for CI. |
| [vagrant](https://github.com/hashicorp/vagrant) | Tool for building and distributing development environments. |
| [vault](https://github.com/hashicorp/vault) | A tool for secrets management, encryption as a service, and privileged access management. |
Expand All @@ -910,6 +911,6 @@ There are 56 apps that you can install on your cluster.
| [waypoint](https://github.com/hashicorp/waypoint) | Easy application deployment for Kubernetes and Amazon ECS |
| [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 146 tools, use `arkade get NAME` to download one.
There are 151 tools, use `arkade get NAME` to download one.

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

func Test_DownloadRegCtl(t *testing.T) {
tools := MakeTools()
name := "regctl"
const version = "v0.5.7"

tool := getTool(name, tools)

tests := []test{
{
os: "ming",
arch: arch64bit,
version: version,
url: `https://github.com/regclient/regclient/releases/download/v0.5.7/regctl-windows-amd64.exe`,
},
{
os: "linux",
arch: arch64bit,
version: version,
url: `https://github.com/regclient/regclient/releases/download/v0.5.7/regctl-linux-amd64`,
},
{
os: "linux",
arch: archARM64,
version: version,
url: `https://github.com/regclient/regclient/releases/download/v0.5.7/regctl-linux-arm64`,
},
{
os: "darwin",
arch: arch64bit,
version: version,
url: `https://github.com/regclient/regclient/releases/download/v0.5.7/regctl-darwin-amd64`,
},
{
os: "darwin",
arch: archDarwinARM64,
version: version,
url: `https://github.com/regclient/regclient/releases/download/v0.5.7/regctl-darwin-arm64`,
},
}
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.Errorf("want: %s, got: %s", tc.url, got)
}
}
}
28 changes: 28 additions & 0 deletions pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -4118,5 +4118,33 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Repo}}
gptscript-{{.Version}}-{{$os}}-{{$arch}}.{{$ext}}
`,
})

tools = append(tools,
Tool{
Owner: "regclient",
Repo: "regclient",
Name: "regctl",
Description: "Utility for accessing docker registries",
BinaryTemplate: `
{{ $os := .OS }}
{{ $arch := .Arch }}
{{ $ext := "" }}
{{- if eq .Arch "aarch64" -}}
{{$arch = "arm64"}}
{{- else if eq .Arch "arm64" -}}
{{ $arch = "arm64" }}
{{- else if eq .Arch "x86_64" -}}
{{ $arch = "amd64" }}
{{- end -}}
{{ if HasPrefix .OS "ming" -}}
{{$os = "windows"}}
{{$ext = ".exe"}}
{{- end -}}
regctl-{{$os}}-{{$arch}}{{$ext}}
`,
})
return tools
}

0 comments on commit 6cf4a64

Please sign in to comment.