Skip to content

Commit

Permalink
workflows: fix in-cluster job kubectl wait
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Busseneau <[email protected]>
  • Loading branch information
nbusseneau committed Jul 21, 2021
1 parent a70f75e commit dc04715
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,17 @@ jobs:
- name: Wait for job
run: |
kubectl -n kube-system wait job/cilium-cli --for=condition=complete --timeout=15m
# Background wait for job to complete or timeout
kubectl -n kube-system wait job/cilium-cli --for=condition=complete --timeout=15m &
complete_pid=$!
# Background wait for job to fail
kubectl -n kube-system wait job/cilium-cli --for=condition=failed && exit 1 &
failed_pid=$!
# Active wait for whichever background wait ends first
wait -n $complete_pid $failed_pid
exit $?
- name: Post-test information gathering
if: ${{ !success() }}
Expand Down

0 comments on commit dc04715

Please sign in to comment.