Refactor Helm action

This commit is contained in:
stefanprodan
2020-05-27 13:06:54 +03:00
parent ea55d3facf
commit 55e7178dad
2 changed files with 23 additions and 11 deletions
+21 -8
View File
@@ -1,10 +1,23 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
HELM_V3=3.2.1
BIN=/home/runner/bin
curl -sSL https://get.helm.sh/helm-v${HELM_V3}-linux-amd64.tar.gz | tar xz
mkdir -p ${BIN}
cp linux-amd64/helm ${BIN}/helm
rm -rf linux-amd64
set -o errexit
set -o nounset
set -o pipefail
HELM_VERSION=3.2.1
BIN_DIR=/home/runner/bin
main() {
mkdir -p ${BIN_DIR}
tmpDir=$(mktemp -d)
pushd $tmpDir >& /dev/null
curl -sSL https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz | tar xz
cp linux-amd64/helm ${BIN_DIR}/helm
popd >& /dev/null
rm -rf $tmpDir
}
main
+2 -3
View File
@@ -20,7 +20,7 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@v2-beta
uses: actions/setup-go@v2
with:
go-version: 1.14.x
- name: Setup Helm
@@ -45,8 +45,7 @@ jobs:
helm upgrade -i podinfo ./charts/podinfo \
--set image.repository=test/podinfo \
--set image.tag=latest \
--namespace=default \
--wait
--namespace=default
- name: Integration test
run: |
kubectl rollout status deployment/podinfo --timeout=1m