test helm deployment in offline environment #778
Workflow file for this run
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
name: test helm deployment in offline environment | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test: | |
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md | |
# includes helm | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: download dependencies | |
run: | | |
helm repo add piraeus-charts https://piraeus.io/helm-charts/ | |
helm dependency build charts/piraeus | |
- name: verify that helm runs offline | |
run: docker run --rm --volume $PWD:/work:ro --volume $(which helm):/usr/local/bin/helm --net=none alpine:latest helm template /work/charts/piraeus | |
- name: verify all pull policies can be set | |
run: | | |
ALL_PULL_POLICIES="$(helm template charts/piraeus | grep -c imagePullPolicy)" | |
CHANGED_PULL_POLICIES="$(helm template charts/piraeus --set global.imagePullPolicy=MyChangedValue | grep -c MyChangedValue)" | |
if [ "${ALL_PULL_POLICIES}" -ne "${CHANGED_PULL_POLICIES}" ] ; then | |
echo "not all pull policies updated!" >&2 | |
exit 1 | |
fi |