Skip to content

Commit

Permalink
moved the helm plugin to this project to manage it easily
Browse files Browse the repository at this point in the history
  • Loading branch information
vyshakhp committed Jul 17, 2018
1 parent 291acc9 commit d058617
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
*.out

bin/
.DS_Store
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fmt:
@([[ ! -z "$(FORMATTED)" ]] && printf "Fixed unformatted files:\n$(FORMATTED)") || true

clean:
rm -rf build release
rm -rf build release bin

linux-amd64:
CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=amd64 $(GO) build -ldflags $(BUILDFLAGS) -o bin/$(NAME).linux.amd64 $(MAIN_GO)
Expand All @@ -49,7 +49,10 @@ windows-386:

.PHONY: release clean

release-all: linux-amd64 linux-386 darwin-amd64 darwin-386 windows-amd64 windows-386
release-all: linux-amd64 linux-386 darwin-amd64 darwin-386

release-plugin: release-all
sh plugin-release.sh

FGT := $(GOPATH)/bin/fgt
$(FGT):
Expand Down
14 changes: 14 additions & 0 deletions plugin-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

rm -rf temp
mkdir temp
cp plugin/* temp/
cd temp

cp ../bin/helmez-bin.linux.amd64 ./helmez.bin && tar -czvf ../bin/helmez.linux.amd64.tgz plugin.yaml run.sh helmez.bin
cp ../bin/helmez-bin.linux.386 ./helmez.bin && tar -czvf ../bin/helmez.linux.386.tgz plugin.yaml run.sh helmez.bin
cp ../bin/helmez-bin.darwin.amd64 ./helmez.bin && tar -czvf ../bin/helmez.darwin.amd64.tgz plugin.yaml run.sh helmez.bin
cp ../bin/helmez-bin.darwin.386 ./helmez.bin && tar -czvf ../bin/helmez.darwin.386.tgz plugin.yaml run.sh helmez.bin

cd ../
rm -rf temp
8 changes: 8 additions & 0 deletions plugin/plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: "helmez"
version: "0.1.2"
usage: "Integrate helmez tools with Helm"
description: |-
This plugin provides helmez services to Helm.
ignoreFlags: false
useTunnel: false
command: "sh -c $HELM_PLUGIN_DIR/run.sh"
3 changes: 3 additions & 0 deletions plugin/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
chmod +x $HELM_PLUGIN_DIR/helmez.bin
$HELM_PLUGIN_DIR/helmez.bin

0 comments on commit d058617

Please sign in to comment.