-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
name: "dashboard" | ||
version: "0.0.0" | ||
version: "0.0.5" | ||
usage: "A simplified way of working with Helm" | ||
description: "View HELM situation in nice web UI" | ||
command: "$HELM_PLUGIN_DIR/bin/dashboard" | ||
#hooks: | ||
# install: "cd $HELM_PLUGIN_DIR; scripts/install_plugin.sh" | ||
# update: "cd $HELM_PLUGIN_DIR; scripts/install_plugin.sh" | ||
hooks: | ||
install: "cd $HELM_PLUGIN_DIR; scripts/install_plugin.sh" | ||
update: "cd $HELM_PLUGIN_DIR; scripts/install_plugin.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/sh -e | ||
|
||
# Copied w/ love from the chartmuseum/helm-push :) | ||
|
||
name="helm-push" | ||
repo="https://github.com/komodorio/${name}" | ||
|
||
if [ -n "${HELM_PUSH_PLUGIN_NO_INSTALL_HOOK}" ]; then | ||
echo "Development mode: not downloading versioned release." | ||
exit 0 | ||
fi | ||
|
||
version="$(cat plugin.yaml | grep "version" | cut -d '"' -f 2)" | ||
echo "Downloading and installing ${name} v${version} ..." | ||
|
||
url="" | ||
|
||
# convert architecture of the target system to a compatible GOARCH value. | ||
# Otherwise failes to download of the plugin from github, because the provided | ||
# architecture by `uname -m` is not part of the github release. | ||
arch="" | ||
case $(uname -m) in | ||
x86_64) | ||
arch="x86_64" | ||
;; | ||
armv6*) | ||
arch="armv6" | ||
;; | ||
# match every arm processor version like armv7h, armv7l and so on. | ||
armv7*) | ||
arch="armv7" | ||
;; | ||
aarch64 | arm64) | ||
arch="arm64" | ||
;; | ||
*) | ||
echo "Failed to detect target architecture" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
|
||
if [ "$(uname)" = "Darwin" ]; then | ||
url="${repo}/releases/download/v${version}/${name}_${version}_darwin_${arch}.tar.gz" | ||
elif [ "$(uname)" = "Linux" ] ; then | ||
url="${repo}/releases/download/v${version}/${name}_${version}_linux_${arch}.tar.gz" | ||
else | ||
url="${repo}/releases/download/v${version}/${name}_${version}_windows_${arch}.tar.gz" | ||
fi | ||
|
||
echo $url | ||
|
||
mkdir -p "bin" | ||
mkdir -p "releases/v${version}" | ||
|
||
# Download with curl if possible. | ||
if [ -x "$(which curl 2>/dev/null)" ]; then | ||
curl -sSL "${url}" -o "releases/v${version}.tar.gz" | ||
else | ||
wget -q "${url}" -O "releases/v${version}.tar.gz" | ||
fi | ||
tar xzf "releases/v${version}.tar.gz" -C "releases/v${version}" | ||
mv "releases/v${version}/bin/${name}" "bin/${name}" || \ | ||
mv "releases/v${version}/bin/${name}.exe" "bin/${name}" |