diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48d84d228..28f26f059 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,5 +23,12 @@ jobs: uses: actions/setup-go@v3 with: go-version: ${{ matrix.go-version }} + - name: "Set up Python" + uses: "actions/setup-python@v4" + with: + python-version: '3.10' + - name: "Install dependencies" + run: | + python -m pip install cogapp - name: Make all run: make all diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f2f36b3e3..4712e6a48 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,6 +20,13 @@ jobs: uses: actions/setup-go@v3 with: go-version: ${{ matrix.go-version }} + - name: "Set up Python" + uses: "actions/setup-python@v4" + with: + python-version: '3.10' + - name: "Install dependencies" + run: | + python -m pip install cogapp - name: Make all run: make all - name: Upload release binaries diff --git a/Makefile b/Makefile index aaf1e99b7..94c2e534a 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,11 @@ LDFLAGS := "-s -w -X github.com/alexellis/arkade/cmd.Version=$(Version) -X githu PLATFORM := $(shell ./hack/platform-tag.sh) SOURCE_DIRS = cmd pkg main.go export GO111MODULE=on +BIN := bin +export PATH := ${PWD}/${BIN}:${PATH} .PHONY: all -all: gofmt test build dist hash +all: gofmt test build dist hash lint .PHONY: build build: @@ -26,14 +28,22 @@ e2e: .PHONY: dist dist: - mkdir -p bin - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o bin/arkade - CGO_ENABLED=0 GOOS=darwin go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o bin/arkade-darwin - CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -a -ldflags $(LDFLAGS) -installsuffix cgo -o bin/arkade-darwin-arm64 - CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o bin/arkade-armhf - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o bin/arkade-arm64 - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o bin/arkade.exe + mkdir -p ${BIN} + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o ${BIN}/arkade + CGO_ENABLED=0 GOOS=darwin go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o ${BIN}/arkade-darwin + CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -a -ldflags $(LDFLAGS) -installsuffix cgo -o ${BIN}/arkade-darwin-arm64 + CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o ${BIN}/arkade-armhf + CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o ${BIN}/arkade-arm64 + CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags $(LDFLAGS) -a -installsuffix cgo -o ${BIN}/arkade.exe .PHONY: hash hash: rm -rf bin/*.sha256 && ./hack/hashgen.sh + +.PHONY: lint +lint: docs + git diff --exit-code # fail if generation caused any diff + +.PHONY: docs +docs: + cog -r README.md diff --git a/README.md b/README.md index e2da89264..febdd97f8 100644 --- a/README.md +++ b/README.md @@ -488,71 +488,80 @@ A CLI or "tool" is a command line tool that you run directly on your own worksta ### Catalog of Apps + | TOOL | DESCRIPTION | |-------------------------|---------------------------------------------------------------------| -| docker-registry-ingress | Install registry ingress with TLS | -| inlets-operator | Install inlets-operator | -| kuma | Install Kuma | -| kube-state-metrics | Install kube-state-metrics | +| OSM | Install osm | +| argocd | Install argocd | +| cassandra | Install cassandra | | cert-manager | Install cert-manager | +| chart | Install the specified helm chart | +| cockroachdb | Install CockroachDB | +| consul-connect | Install Consul Service Mesh | +| cron-connector | Install cron-connector for OpenFaaS | +| crossplane | Install Crossplane | | docker-registry | Install a Docker registry | -| rabbitmq | Install rabbitmq | -| linkerd | Install linkerd | -| redis | Install redis | -| gitlab | Install GitLab | +| docker-registry-ingress | Install registry ingress with TLS | | falco | Install Falco | -| registry-creds | Install registry-creds | -| qemu-static | Install qemu-user-static | -| metrics-server | Install metrics-server | -| postgresql | Install postgresql | +| gitea | Install gitea | +| gitlab | Install GitLab | +| grafana | Install grafana | +| influxdb | Install influxdb | | ingress-nginx | Install ingress-nginx | +| inlets-operator | Install inlets-operator | +| inlets-tcp-client | Install inlets PRO TCP client | +| istio | Install istio | | jenkins | Install jenkins | -| nginx-inc | Install nginx-inc for OpenFaaS | -| metallb-arp | Install MetalLB in L2 (ARP) mode | -| loki | Install Loki for monitoring and tracing | -| nfs-provisioner | Install nfs subdir external provisioner | -| mqtt-connector | Install mqtt-connector for OpenFaaS | -| kanister | Install kanister for application-level data management | -| openfaas-ingress | Install openfaas ingress with TLS | -| chart | Install the specified helm chart | -| cron-connector | Install cron-connector for OpenFaaS | -| minio | Install minio | -| openfaas | Install openfaas | | kafka | Install Confluent Platform Kafka | -| kubernetes-dashboard | Install kubernetes-dashboard | -| OSM | Install osm | -| inlets-tcp-client | Install inlets PRO TCP client | +| kafka-connector | Install kafka-connector for OpenFaaS | +| kanister | Install kanister for application-level data management | | kong-ingress | Install kong-ingress for OpenFaaS | -| sealed-secret | Install sealed-secrets | -| cassandra | Install cassandra | -| waypoint | Install Waypoint | -| opa-gatekeeper | Install Open Policy Agent (OPA) Gatekeeper | -| mongodb | Install mongodb | -| grafana | Install grafana | | kube-image-prefetch | Install kube-image-prefetch | -| consul-connect | Install Consul Service Mesh | -| argocd | Install argocd | -| prometheus | Install Prometheus for monitoring | -| istio | Install istio | -| crossplane | Install Crossplane | -| cockroachdb | Install CockroachDB | +| kube-state-metrics | Install kube-state-metrics | +| kubernetes-dashboard | Install kubernetes-dashboard | +| kuma | Install Kuma | +| kyverno | Install Kyverno | +| linkerd | Install linkerd | +| loki | Install Loki for monitoring and tracing | +| metallb-arp | Install MetalLB in L2 (ARP) mode | +| metrics-server | Install metrics-server | +| minio | Install minio | +| mongodb | Install mongodb | +| mqtt-connector | Install mqtt-connector for OpenFaaS | +| nats-connector | Install OpenFaaS connector for NATS | +| nfs-provisioner | Install nfs subdir external provisioner | +| nginx-inc | Install nginx-inc for OpenFaaS | +| opa-gatekeeper | Install Open Policy Agent (OPA) Gatekeeper | +| openfaas | Install openfaas | +| openfaas-ingress | Install openfaas ingress with TLS | | openfaas-loki | Install Loki-OpenFaaS and Configure Loki logs provider for OpenFaaS | | portainer | Install portainer to visualise and manage containers | +| postgresql | Install postgresql | +| prometheus | Install Prometheus for monitoring | +| qemu-static | Install qemu-user-static | +| rabbitmq | Install rabbitmq | +| redis | Install redis | +| registry-creds | Install registry-creds | +| sealed-secret | Install sealed-secrets | | tekton | Install Tekton pipelines and dashboard | | traefik2 | Install traefik2 | -| kafka-connector | Install kafka-connector for OpenFaaS | -| gitea | Install gitea | -| influxdb | Install influxdb | -| nats-connector | Install OpenFaaS connector for NATS | -| kyverno | Install Kyverno | +| waypoint | Install Waypoint | There are 55 apps that you can install on your cluster. - -> Note to contributors, run `arkade install --print-table` to generate this list + ### Catalog of CLIs -| TOOL | DESCRIPTION | + +| TOOL | DESCRIPTION | |------------------|-------------------------------------------------------------------------------------------------------------------------------------------| | argocd | Declarative, GitOps continuous delivery tool for Kubernetes. | | argocd-autopilot | An opinionated way of installing Argo-CD and managing GitOps repositories. | @@ -575,8 +584,8 @@ There are 55 apps that you can install on your cluster. | flux | Continuous Delivery solution for Kubernetes powered by GitOps Toolkit. | | fzf | General-purpose command-line fuzzy finder | | gh | GitHub’s official command line tool. | -| gomplate | A flexible commandline tool for template rendering. Supports lots of local and remote datasources. | | golangci-lint | Go linters aggregator. | +| gomplate | A flexible commandline tool for template rendering. Supports lots of local and remote datasources. | | goreleaser | Deliver Go binaries as fast and easily as possible | | helm | The Kubernetes Package Manager: Think of it like apt/yum/homebrew for Kubernetes. | | helmfile | Deploy Kubernetes Helm Charts | @@ -653,5 +662,4 @@ There are 55 apps that you can install on your cluster. | waypoint | Easy application deployment for Kubernetes and Amazon ECS | | yq | Portable command-line YAML processor. | There are 98 tools, use 'arkade get NAME' to download one. - -> Note to contributors, run `arkade get --output markdown` to generate this list + diff --git a/cmd/install.go b/cmd/install.go index ec8c3a319..0e257c263 100644 --- a/cmd/install.go +++ b/cmd/install.go @@ -6,6 +6,7 @@ package cmd import ( "fmt" "os" + "sort" "github.com/alexellis/arkade/cmd/apps" "github.com/olekukonko/tablewriter" @@ -51,8 +52,14 @@ command.`, table.SetCenterSeparator("|") table.SetAutoWrapText(false) - for k, v := range appList { - table.Append([]string{k, v.Installer().Short}) + keys := make([]string, 0) + for k := range appList { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, key := range keys { + table.Append([]string{key, appList[key].Installer().Short}) } table.Render()