Skip to content

Commit

Permalink
helm-chart/ci: create an upgrade test
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Oct 10, 2021
1 parent 2f07e0f commit edfb641
Showing 1 changed file with 54 additions and 1 deletion.
55 changes: 54 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ jobs:
- k3s-channel: v1.18
helm-version: v3.5.0
test: helm
- k3s-channel: stable
test: helm
test-variation: upgrade
# upgrade-from represents a release channel, see: https://jupyterhub.github.io/helm-chart/info.json
upgrade-from: dev
upgrade-from-extra-args: ""
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -143,14 +149,61 @@ jobs:
--set config.BinderHub.hub_url=http://localhost:30902 \
--set config.BinderHub.access_token=$GITHUB_ACCESS_TOKEN
- name: "(Upgrade) Install ${{ matrix.upgrade-from }} chart"
if: matrix.test-variation == 'upgrade'
run: |
. ./ci/common
UPGRADE_FROM_VERSION=$(curl -sS https://jupyterhub.github.io/helm-chart/info.json | jq -er '.binderhub.${{ matrix.upgrade-from }}')
echo "UPGRADE_FROM_VERSION=$UPGRADE_FROM_VERSION" >> $GITHUB_ENV
echo ""
echo "Installing already released binderhub version $UPGRADE_FROM_VERSION"
# FIXME: We change the directory so binderhub the chart name won't be
# misunderstood as the local folder name.
#
# https://github.com/helm/helm/issues/9244
cd ci
helm install binderhub-test \
--repo https://jupyterhub.github.io/helm-chart/ binderhub \
--version=$UPGRADE_FROM_VERSION \
--values ../testing/k8s-binder-k8s-hub/binderhub-chart-config.yaml \
--set config.BinderHub.hub_url=http://localhost:30902 \
--set config.BinderHub.hub_url_local=http://proxy-public \
--set config.GitHubRepoProvider.access_token=$GITHUB_ACCESS_TOKEN \
${{ matrix.upgrade-from-extra-args }}
- name: "(Upgrade) Install helm diff"
if: matrix.test-variation == 'upgrade'
run: |
helm plugin install https://github.com/databus23/helm-diff
- name: "(Upgrade) Helm diff ${{ matrix.upgrade-from }} chart with local chart"
if: matrix.test-variation == 'upgrade'
run: |
helm diff upgrade binderhub-test ./helm-chart/binderhub \
--values testing/k8s-binder-k8s-hub/binderhub-chart-config.yaml \
--set config.BinderHub.hub_url=http://localhost:30902 \
--set config.BinderHub.hub_url_local=http://proxy-public \
--set config.GitHubRepoProvider.access_token=$GITHUB_ACCESS_TOKEN \
${{ matrix.local-chart-extra-args }}
- name: "(Upgrade) Await ${{ matrix.upgrade-from }} chart"
if: matrix.test-variation == 'upgrade'
uses: jupyterhub/action-k8s-await-workloads@v1
with:
timeout: 150
max-restarts: 1

- name: Install the chart
if: matrix.test == 'helm'
run: |
helm upgrade --install binderhub-test helm-chart/binderhub \
--values testing/k8s-binder-k8s-hub/binderhub-chart-config.yaml \
--set config.BinderHub.hub_url=http://localhost:30902 \
--set config.BinderHub.hub_url_local=http://proxy-public \
--set config.BinderHub.access_token=$GITHUB_ACCESS_TOKEN
--set config.BinderHub.access_token=$GITHUB_ACCESS_TOKEN \
${{ matrix.local-chart-extra-args }}
- name: Await and curl JupyterHub
run: |
Expand Down

0 comments on commit edfb641

Please sign in to comment.