Skip to content

Commit

Permalink
Merge pull request jupyterhub#1245 from consideRatio/pr/updates-to-ci
Browse files Browse the repository at this point in the history
ci: add helm diff workflow
  • Loading branch information
consideRatio authored Jan 15, 2021
2 parents ad89a87 + f479e7c commit 8debab3
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 8 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This workflow provides a diff of the rendered Helm chart's templates with the
# latest released dev version of the chart.
---
name: Helm diff

on:
pull_request:
push:
workflow_dispatch:

jobs:
diff-rendered-templates:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: jupyterhub/action-k3s-helm@v1
with:
k3s-channel: v1.19
metrics-enabled: false
traefik-enabled: false
docker-enabled: true

- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install helm diff plugin, update local chart dependencies
run: |
helm plugin install https://github.com/databus23/helm-diff
helm dependency update ./helm-chart/binderhub
- name: "Install latest released dev chart"
run: |
UPGRADE_FROM_VERSION=$(curl -sS https://jupyterhub.github.io/helm-chart/info.json | jq -er '.binderhub.dev')
# NOTE: We change the directory so binderhub the chart name won't be
# misunderstood as the local folder name.
cd testing
helm install binderhub-test binderhub \
--values ./k8s-binder-k8s-hub/binderhub-chart-config.yaml \
--repo https://jupyterhub.github.io/helm-chart/ \
--version=$UPGRADE_FROM_VERSION
- name: "Helm diff latest released dev chart with local chart"
run: |
echo "NOTE: For the helm diff, we have not updated the Chart.yaml"
echo " version or image tags using chartpress."
echo
helm diff upgrade binderhub-test helm-chart/binderhub \
--values testing/k8s-binder-k8s-hub/binderhub-chart-config.yaml \
--context=3
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,22 @@ jobs:
--set config.BinderHub.hub_url_local=http://proxy-public \
--set config.BinderHub.access_token=$GITHUB_ACCESS_TOKEN
- name: Wait for JupyterHub to be ready
timeout-minutes: 10
- name: Await and curl JupyterHub
run: |
. ci/common
await_jupyterhub
echo "curl http://localhost:30902/hub/api/" should print the JupyterHub version
curl http://localhost:30902/hub/api/
- name: Wait for BinderHub to be ready
echo curl http://localhost:30902/hub/api/ should print the JupyterHub version
curl http://localhost:30902/hub/api/ --max-time 5 --retry 5 --retry-delay 1 --retry-connrefused
- name: Await and curl BinderHub
if: matrix.test == 'helm'
timeout-minutes: 10
run: |
. ci/common
await_binderhub
echo "curl http://localhost:30901/health" to check BinderHub\'s health
curl http://localhost:30901/health
echo curl http://localhost:30901/health to check BinderHub\'s health
curl http://localhost:30901/health --max-time 5 --retry 5 --retry-delay 1 --retry-connrefused
- name: Run main tests
if: matrix.test == 'main'
Expand Down

0 comments on commit 8debab3

Please sign in to comment.