From 2b1420068add22ac6d6e7d83d76d68a435e6e214 Mon Sep 17 00:00:00 2001 From: Dmitry Kondratyev Date: Tue, 8 Aug 2023 22:53:11 -0400 Subject: [PATCH] update CI workflow --- .github/workflows/ci.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index eccb803..25363b6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,10 +32,18 @@ jobs: helm repo update helm upgrade --cleanup-on-fail --install cmshub jupyterhub/jupyterhub --values values.yaml - - name: Wait for JupyterHub container to start or fail + - 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 + + - name: Check the status of JupyterHub run: | while true; do - POD_STATUS=$(kubectl get pod -l app=jupyterhub -l component=hub -o jsonpath='{.status.phase}') + POD_STATUS=$(kubectl get pod -l app=jupyterhub -l component=hub -o jsonpath='{.items[*].status.phase}') if [[ "$POD_STATUS" == "Failed" ]]; then echo "Pod $POD_NAME is in a Failed state." exit 1 @@ -48,11 +56,3 @@ jobs: 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 \ No newline at end of file