Skip to content

Commit 58da2fb

Browse files
committed
add kubectl logs when deploy studio fail in e2e wf
Signed-off-by: wwanarif <wan.abdul.hakim.b.wan.arif@intel.com>
1 parent 44211dc commit 58da2fb

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/_e2e-test.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,18 @@ jobs:
3939
- name: Deploy GenAI Studio
4040
run: |
4141
sudo apt install ansible -y
42-
ansible-playbook genai-studio.yml -e "container_registry=${OPEA_IMAGE_REPO}opea" -e "container_tag=${{ inputs.tag }}" -e "mysql_host=mysql.mysql.svc.cluster.local" -e "http_proxy=${http_proxy}"
42+
ansible-playbook genai-studio.yml -e "container_registry=${OPEA_IMAGE_REPO}opea" -e "container_tag=${{ inputs.tag }}" -e "mysql_host=mysql.mysql.svc.cluster.local" -e "http_proxy=${http_proxy}" || {
43+
echo "Ansible playbook failed. Checking pod status..."
44+
echo "=== Pods in studio namespace ==="
45+
kubectl get pods -n studio
46+
echo "=== Logs and events for non-Ready pods in studio namespace ==="
47+
for pod in $(kubectl get pods -n studio --field-selector=status.phase!=Running,status.phase!=Succeeded -o jsonpath='{.items[*].metadata.name}'); do
48+
echo "--- Pod: $pod ---"
49+
kubectl describe pod $pod -n studio
50+
kubectl logs $pod -n studio --all-containers=true --tail=100 || echo "Could not fetch logs for $pod"
51+
done
52+
}
4353
sleep 5
44-
kubectl wait --for=condition=ready pod --all --namespace=studio --timeout=300s --field-selector=status.phase!=Succeeded
45-
kubectl wait --for=condition=ready pod --all --namespace=monitoring --timeout=300s --field-selector=status.phase!=Succeeded
4654
working-directory: ${{ github.workspace }}/setup-scripts/setup-genai-studio/
4755

4856
- name: Set up Node.js

0 commit comments

Comments
 (0)