Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

HNC: Add support for plugin build for darwin amd64 #1032

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions incubator/hnc/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ steps:
kustomize build . -o ./hnc-manager.yaml

# Build plugin
go build -o kubectl-hns ../cmd/kubectl/main.go
GOOS=linux GOARCH=amd64 go build -o kubectl-hns_linux_amd64 ../cmd/kubectl/main.go
GOOS=darwin GOARCH=amd64 go build -o kubectl-hns_darwin_amd64 ../cmd/kubectl/main.go
# Upload manifest
- name: gcr.io/cloud-builders/curl
args:
Expand All @@ -43,18 +44,30 @@ steps:
- '-u'
- '$_HNC_USER:$_HNC_PERSONAL_ACCESS_TOKEN'
- 'https://uploads.github.com/repos/kubernetes-sigs/multi-tenancy/releases/$_HNC_RELEASE_ID/assets?name=hnc-manager.yaml'
# Upload plugin
# Upload plugin (Linux)
- name: gcr.io/cloud-builders/curl
args:
- '-X'
- 'POST'
- '-H'
- 'Content-Type: application/x-application'
- '--data-binary'
- '@multi-tenancy/incubator/hnc/out/kubectl-hns'
- '@multi-tenancy/incubator/hnc/out/kubectl-hns_linux_amd64'
- '-u'
- '$_HNC_USER:$_HNC_PERSONAL_ACCESS_TOKEN'
- 'https://uploads.github.com/repos/kubernetes-sigs/multi-tenancy/releases/$_HNC_RELEASE_ID/assets?name=kubectl-hns'
- 'https://uploads.github.com/repos/kubernetes-sigs/multi-tenancy/releases/$_HNC_RELEASE_ID/assets?name=kubectl-hns_linux_amd64'
# Upload plugin (Darwin)
- name: gcr.io/cloud-builders/curl
args:
- '-X'
- 'POST'
- '-H'
- 'Content-Type: application/x-application'
- '--data-binary'
- '@multi-tenancy/incubator/hnc/out/kubectl-hns_darwin_amd64'
- '-u'
- '$_HNC_USER:$_HNC_PERSONAL_ACCESS_TOKEN'
- 'https://uploads.github.com/repos/kubernetes-sigs/multi-tenancy/releases/$_HNC_RELEASE_ID/assets?name=kubectl-hns_darwin_amd64'
# Build Docker image
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/$PROJECT_ID/$_HNC_IMG_NAME:$_HNC_IMG_TAG', 'multi-tenancy/incubator/hnc']
Expand Down