Skip to content

CI workflow

CI workflow #8

Workflow file for this run

name: CI workflow
on: workflow_dispatch
jobs:
purdue-af-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.1
# - uses: actions/setup-python@v4
# with:
# python-version: '3.9'
# check-latest: true
# - name: Set up chart-testing
# uses: helm/[email protected]
- name: Create kind cluster
uses: helm/[email protected]
- name: Install JupyterHub
run: |
cd jupyterhub
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm repo update
helm upgrade --cleanup-on-fail --install cmshub jupyterhub/jupyterhub --values values.yaml
- name: Check the status of JupyterHub
run: |
POD_NAME=$(kubectl get pod -l app=jupyterhub -l component=hub -o jsonpath='{.items[*].metadata.name}')
while true; do
POD_STATUS=$(kubectl get pod $POD_NAME -o jsonpath='{.status.phase}')
if [[ "$POD_STATUS" == "Failed" ]]; then
echo "Pod $POD_NAME is in a Failed state."
exit 1
elif [[ "$POD_STATUS" == "Running" ]]; then
echo "Pod $POD_NAME is in a Running state."
break
else
echo "Pod $POD_NAME is in $POD_STATUS state. Waiting..."
kubectl describe pod $POD_NAME
echo "--------"
kubectl logs $POD_NAME | tail
echo "--------"
sleep 10 # Adjust the sleep interval as needed
fi
done
timeout-minutes: 2
- name: Install Prometheus & Grafana
run: |
cd monitoring/prometheus
helm upgrade --install prometheus . --values values.yaml
cd ../grafana
helm upgrade --install grafana . --values values.yaml
kubectl get pods