Skip to content

Commit

Permalink
add windows amd64 cli
Browse files Browse the repository at this point in the history
  • Loading branch information
olljanat committed Sep 10, 2021
1 parent b03328e commit a755bb4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ build: generate fmt vet manifests
-o bin/kubectl/kubectl-hns_linux_arm \
-ldflags="-X sigs.k8s.io/hierarchical-namespaces/internal/version.Version=${HNC_IMG_TAG}" \
./cmd/kubectl/main.go
GOOS=windows GOARCH=amd64 go build \
-o bin/kubectl/kubectl-hns_windows_amd64.exe \
-ldflags="-X sigs.k8s.io/hierarchical-namespaces/internal/version.Version=${HNC_IMG_TAG}" \
./cmd/kubectl/main.go

# Clean all binaries (manager and kubectl)
clean: krew-uninstall
Expand Down
12 changes: 12 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ steps:
- '-u'
- '$_HNC_USER:$_HNC_PERSONAL_ACCESS_TOKEN'
- 'https://uploads.github.com/repos/$_HNC_REPO_OWNER/hierarchical-namespaces/releases/$_HNC_RELEASE_ID/assets?name=kubectl-hns_darwin_amd64'
# Upload plugin (Windows)
- name: gcr.io/cloud-builders/curl
args:
- '-X'
- 'POST'
- '-H'
- 'Content-Type: application/x-application'
- '--data-binary'
- '@hierarchical-namespaces/bin/kubectl/kubectl-hns_windows_amd64.exe'
- '-u'
- '$_HNC_USER:$_HNC_PERSONAL_ACCESS_TOKEN'
- 'https://uploads.github.com/repos/$_HNC_REPO_OWNER/hierarchical-namespaces/releases/$_HNC_RELEASE_ID/assets?name=kubectl-hns_windows_amd64.exe'
# Upload plugin (Krew tar file)
- name: gcr.io/cloud-builders/curl
args:
Expand Down
12 changes: 12 additions & 0 deletions hack/krew-kubectl-hns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,15 @@ spec:
- from: "bin/kubectl/LICENSE"
to: "."
bin: "./kubectl-hns_darwin_amd64"
- uri: https://github.com/HNC_RELEASE_REPO_OWNER/hierarchical-namespaces/releases/download/hnc-HNC_IMG_TAG/kubectl-hns.tar.gz
selector:
matchLabels:
os: windows
arch: amd64
sha256: HNC_KREW_TAR_SHA256
files:
- from: "bin/kubectl/kubectl-hns_windows_amd64.exe"
to: "."
- from: "bin/kubectl/LICENSE"
to: "."
bin: "./kubectl-hns_windows_amd64.exe"

0 comments on commit a755bb4

Please sign in to comment.