Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plugin krew manifest #4014

Merged
merged 1 commit into from
Apr 16, 2019
Merged
Show file tree
Hide file tree
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
13 changes: 7 additions & 6 deletions build/build-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,18 @@ release=cmd/plugin/release
function build_for_arch(){
os=$1
arch=$2
extension=$3

env GOOS=${os} GOARCH=${arch} go build \
${GOBUILD_FLAGS} \
-ldflags "-s -w \
-X ${PKG}/version.RELEASE=${TAG} \
-X ${PKG}/version.COMMIT=${GIT_COMMIT} \
-X ${PKG}/version.REPO=${REPO_INFO}" \
-o ${release}/kubectl-ingress_nginx ${PKG}/cmd/plugin
-o ${release}/kubectl-ingress_nginx${extension} ${PKG}/cmd/plugin

tar -C ${release} -zcvf ${release}/kubectl-ingress_nginx-${os}-${arch}.tar.gz kubectl-ingress_nginx
rm ${release}/kubectl-ingress_nginx
tar -C ${release} -zcvf ${release}/kubectl-ingress_nginx-${os}-${arch}.tar.gz kubectl-ingress_nginx${extension}
rm ${release}/kubectl-ingress_nginx${extension}
hash=`sha256sum ${release}/kubectl-ingress_nginx-${os}-${arch}.tar.gz | awk '{ print $1 }'`
sed -i "s/%%%shasum_${os}_${arch}%%%/${hash}/g" ${release}/ingress-nginx.yaml
}
Expand All @@ -68,6 +69,6 @@ cp cmd/plugin/ingress-nginx.yaml.tmpl ${release}/ingress-nginx.yaml

sed -i "s/%%%tag%%%/${TAG}/g" ${release}/ingress-nginx.yaml

build_for_arch darwin amd64
build_for_arch linux amd64
build_for_arch windows amd64
build_for_arch darwin amd64 ''
build_for_arch linux amd64 ''
build_for_arch windows amd64 '.exe'
3 changes: 2 additions & 1 deletion cmd/plugin/ingress-nginx.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ spec:
description: |
The official kubectl plugin for ingress-nginx.
version: %%%tag%%%
homepage: https://kubernetes.github.io/ingress-nginx/kubectl-plugin/
platforms:
- uri: https://github.com/kubernetes/ingress-nginx/releases/download/nginx-%%%tag%%%/kubectl-ingress_nginx-darwin-amd64.tar.gz
sha256: %%%shasum_darwin_amd64%%%
Expand All @@ -33,7 +34,7 @@ spec:
files:
- from: "*"
to: "."
bin: "./kubectl-ingress_nginx"
bin: "./kubectl-ingress_nginx.exe"
selector:
matchLabels:
os: windows
Expand Down