Make kubectl logs redundant for connection failure (#114)
This commit is contained in:
parent
35e9dd5894
commit
4ae17c5b1d
|
@ -25,7 +25,6 @@ env:
|
||||||
NAMESPACE: default
|
NAMESPACE: default
|
||||||
JOB_MANIFEST: docker/job-release-tests.yaml
|
JOB_MANIFEST: docker/job-release-tests.yaml
|
||||||
COMMAND: dotnet test Tests/CodexReleaseTests
|
COMMAND: dotnet test Tests/CodexReleaseTests
|
||||||
DURATION: 7200
|
|
||||||
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
||||||
KUBE_VERSION: v1.30.5
|
KUBE_VERSION: v1.30.5
|
||||||
|
|
||||||
|
@ -82,7 +81,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# Variables
|
# Variables
|
||||||
# We need more than 300 seconds because Auto Scaler may take 3 minutes to tun a node
|
# We need more than 300 seconds because Auto Scaler may take 3 minutes to tun a node
|
||||||
duration=${{ env.DURATION }}
|
|
||||||
namespace="${{ env.NAMESPACE }}"
|
namespace="${{ env.NAMESPACE }}"
|
||||||
pod=$(kubectl get pod --selector job-name=${{ env.NAMEPREFIX }} -o jsonpath='{.items[0].metadata.name}')
|
pod=$(kubectl get pod --selector job-name=${{ env.NAMEPREFIX }} -o jsonpath='{.items[0].metadata.name}')
|
||||||
|
|
||||||
|
@ -97,7 +95,11 @@ jobs:
|
||||||
done
|
done
|
||||||
|
|
||||||
# Get logs
|
# 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
|
- name: Set workflow status from job status
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Reference in New Issue