Skip to content

Commit

Permalink
[CI] Update timeout in GC & whole-conformance job (#2346)
Browse files Browse the repository at this point in the history
* GC job allows more time for testbeds
* Larger timeout for whole-conformance test

Signed-off-by: Zhecheng Li <lzhecheng@vmware.com>
  • Loading branch information
lzhecheng authored Jul 6, 2021
1 parent 1088cab commit d84da6c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ci/jenkins/jobs/projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@
variable: CODECOV_TOKEN
- timeout:
fail: true
timeout: 150
timeout: 240
type: absolute
- credentials-binding:
- text:
Expand Down
15 changes: 9 additions & 6 deletions ci/jenkins/test-vmc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -590,20 +590,23 @@ function garbage_collection() {
echo "=== Auto cleanup starts ==="
export KUBECONFIG=$KUBECONFIG_PATH

kubectl get ns -l antrea-ci -o custom-columns=Name:.metadata.name,DATE:.metadata.creationTimestamp --no-headers=true | awk '{cmd="echo $(( $(date +%s) - $(date -d "$2" +%s) ))"; cmd | getline t ; print $1, t}' | awk '$1 ~ "matrix" && $2 > 14400 {print $1}' | while read cluster; do
echo "=== Currently ${cluster} has been live for more than 4h ==="
kubectl get ns -l antrea-ci -o custom-columns=Name:.metadata.name,DATE:.metadata.creationTimestamp --no-headers=true | awk '{cmd="echo $(( $(date +%s) - $(date -d "$2" +%s) ))"; cmd | getline t ; print $1, t}' | awk '$1 ~ "matrix" && $2 > 36000 {print $1}' | while read cluster; do
# Matrix tests
echo "=== Currently ${cluster} has been live for more than 10h ==="
kubectl delete ns ${cluster}
echo "=== Old namespace ${cluster} has been deleted !!! ==="
done

kubectl get ns -l antrea-ci -o custom-columns=Name:.metadata.name,DATE:.metadata.creationTimestamp --no-headers=true | awk '{cmd="echo $(( $(date +%s) - $(date -d "$2" +%s) ))"; cmd | getline t ; print $1, t}' | awk '$1 ~ "whole-conformance" && $2 > 10800 {print $1}' | while read cluster; do
echo "=== Currently ${cluster} has been live for more than 3h ==="
kubectl get ns -l antrea-ci -o custom-columns=Name:.metadata.name,DATE:.metadata.creationTimestamp --no-headers=true | awk '{cmd="echo $(( $(date +%s) - $(date -d "$2" +%s) ))"; cmd | getline t ; print $1, t}' | awk '$1 ~ "whole-conformance" && $2 > 14400 {print $1}' | while read cluster; do
# Whole-conformance test
echo "=== Currently ${cluster} has been live for more than 4h ==="
kubectl delete ns ${cluster}
echo "=== Old namespace ${cluster} has been deleted !!! ==="
done

kubectl get ns -l antrea-ci -o custom-columns=Name:.metadata.name,DATE:.metadata.creationTimestamp --no-headers=true | awk '{cmd="echo $(( $(date +%s) - $(date -d "$2" +%s) ))"; cmd | getline t ; print $1, t}' | awk '$1 !~ "matrix" && $1 !~ "whole-conformance" && $2 > 5400 {print $1}' | while read cluster; do
echo "=== Currently ${cluster} has been live for more than 1.5h ==="
kubectl get ns -l antrea-ci -o custom-columns=Name:.metadata.name,DATE:.metadata.creationTimestamp --no-headers=true | awk '{cmd="echo $(( $(date +%s) - $(date -d "$2" +%s) ))"; cmd | getline t ; print $1, t}' | awk '$1 !~ "matrix" && $1 !~ "whole-conformance" && $2 > 9000 {print $1}' | while read cluster; do
# e2e, conformance, networkpolicy tests
echo "=== Currently ${cluster} has been live for more than 2.5h ==="
kubectl delete ns ${cluster}
echo "=== Old namespace ${cluster} has been deleted !!! ==="
done
Expand Down

0 comments on commit d84da6c

Please sign in to comment.