Make kubectl logs redundant for connection failure (#114)

This commit is contained in:
Slava 2024-12-02 16:38:02 +02:00 committed by GitHub
parent 35e9dd5894
commit 4ae17c5b1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -25,7 +25,6 @@ env:
NAMESPACE: default
JOB_MANIFEST: docker/job-release-tests.yaml
COMMAND: dotnet test Tests/CodexReleaseTests
DURATION: 7200
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
KUBE_VERSION: v1.30.5
@ -82,7 +81,6 @@ jobs:
run: |
# Variables
# We need more than 300 seconds because Auto Scaler may take 3 minutes to tun a node
duration=${{ env.DURATION }}
namespace="${{ env.NAMESPACE }}"
pod=$(kubectl get pod --selector job-name=${{ env.NAMEPREFIX }} -o jsonpath='{.items[0].metadata.name}')
@ -97,7 +95,11 @@ jobs:
done
# Get logs
timeout $duration kubectl logs $pod -n $namespace -f || true
while [[ $(kubectl get pod ${pod} -n ${namespace} -o jsonpath='{.status.phase}') == "Running" ]]; do
echo "Show ${pod} logs ..."
kubectl logs $pod -n $namespace -f || true
sleep 1
done
- name: Set workflow status from job status
run: |