-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·38 lines (31 loc) · 1.17 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
set -e
echo ""
echo "When including a plugin in a BitOps install, this script will be called during docker build."
echo "It should be used to install any dependencies required to actually run your plugin."
echo "BitOps uses alpine linux as its base, so you'll want to use apk commands (Alpine Package Keeper)"
echo ""
#apk info
mkdir -p /opt/download
cd /opt/download
LATEST_RELEASE=$(curl https://api.github.com/repos/helm/helm/releases/latest | jq --raw-output '.tag_name' | cut -c 2-)
HELM_VERSION=${LATEST_RELEASE}
function install_helm() {
if [[ "$HELM_VERSION" == '3.2.0' ]]; then
wget https://get.helm.sh/helm-v$HELM_VERSION-linux-amd64.tar.gz
tar -xzvf helm-v$HELM_VERSION-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/
bash -x scripts/helm/install_tiller.sh
else
wget https://get.helm.sh/helm-v$HELM_VERSION-linux-amd64.tar.gz
tar -xzvf helm-v$HELM_VERSION-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/
fi
}
function install_helm_s3() {
helm plugin install https://github.com/hypnoglow/helm-s3.git
}
install_helm
install_helm_s3
# Verify Helm installation
helm version