Skip to content

Commit d251805

Browse files
committed
retry allocate in all workflows
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
1 parent 49d0b1e commit d251805

File tree

6 files changed

+97
-7
lines changed

6 files changed

+97
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,22 @@ jobs:
5858
- name: Install Binaries
5959
run: ./hack/install-binaries.sh
6060
- name: Allocate Cluster
61-
run: ./hack/allocate.sh
61+
run: |
62+
attempt=0
63+
max_attempts=5
64+
until [ $attempt -ge $max_attempts ]
65+
do
66+
attempt=$((attempt+1))
67+
echo "------------------ Attempt $attempt ------------------"
68+
./hack/allocate.sh && break
69+
echo "------------------ failed, retrying... ------------------"
70+
if [ $attempt -ge $max_attempts ]; then
71+
echo "------------------ max # of retries reached, exiting ------------------"
72+
exit 1
73+
fi
74+
./hack/delete.sh
75+
done
76+
echo "------------------ finished! attempt $attempt ------------------"
6277
- name: Local Registry
6378
run: ./hack/registry.sh
6479
- name: Setup testing images

.github/workflows/test-e2e-oncluster-runtime.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,22 @@ jobs:
2222
- name: Install Binaries
2323
run: ./hack/install-binaries.sh
2424
- name: Allocate Cluster
25-
run: ./hack/allocate.sh
25+
run: |
26+
attempt=0
27+
max_attempts=5
28+
until [ $attempt -ge $max_attempts ]
29+
do
30+
attempt=$((attempt+1))
31+
echo "------------------ Attempt $attempt ------------------"
32+
./hack/allocate.sh && break
33+
echo "------------------ failed, retrying... ------------------"
34+
if [ $attempt -ge $max_attempts ]; then
35+
echo "------------------ max # of retries reached, exiting ------------------"
36+
exit 1
37+
fi
38+
./hack/delete.sh
39+
done
40+
echo "------------------ finished! attempt $attempt ------------------"
2641
- name: Setup testing images
2742
run: ./hack/setup-testing-images.sh
2843
- name: Deploy Tekton

.github/workflows/test-e2e-oncluster.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,22 @@ jobs:
2020
- name: Install Binaries
2121
run: ./hack/install-binaries.sh
2222
- name: Allocate Cluster
23-
run: ./hack/allocate.sh
23+
run: |
24+
attempt=0
25+
max_attempts=5
26+
until [ $attempt -ge $max_attempts ]
27+
do
28+
attempt=$((attempt+1))
29+
echo "------------------ Attempt $attempt ------------------"
30+
./hack/allocate.sh && break
31+
echo "------------------ failed, retrying... ------------------"
32+
if [ $attempt -ge $max_attempts ]; then
33+
echo "------------------ max # of retries reached, exiting ------------------"
34+
exit 1
35+
fi
36+
./hack/delete.sh
37+
done
38+
echo "------------------ finished! attempt $attempt ------------------"
2439
- name: Setup testing images
2540
run: ./hack/setup-testing-images.sh
2641
- name: Deploy Tekton

.github/workflows/test-e2e.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,22 @@ jobs:
1919
- name: Install Binaries
2020
run: ./hack/install-binaries.sh
2121
- name: Allocate Cluster
22-
run: ./hack/allocate.sh
22+
run: |
23+
attempt=0
24+
max_attempts=5
25+
until [ $attempt -ge $max_attempts ]
26+
do
27+
attempt=$((attempt+1))
28+
echo "------------------ Attempt $attempt ------------------"
29+
./hack/allocate.sh && break
30+
echo "------------------ failed, retrying... ------------------"
31+
if [ $attempt -ge $max_attempts ]; then
32+
echo "------------------ max # of retries reached, exiting ------------------"
33+
exit 1
34+
fi
35+
./hack/delete.sh
36+
done
37+
echo "------------------ finished! attempt $attempt ------------------"
2338
- name: Local Registry
2439
run: ./hack/registry.sh
2540
- name: E2E Test

.github/workflows/test-integration.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,25 @@ jobs:
2929
- uses: imjasonh/setup-ko@v0.6
3030
- name: Install Binaries
3131
run: ./hack/install-binaries.sh
32+
- name: Allocate Cluster
33+
run: |
34+
attempt=0
35+
max_attempts=5
36+
until [ $attempt -ge $max_attempts ]
37+
do
38+
attempt=$((attempt+1))
39+
echo "------------------ Attempt $attempt ------------------"
40+
./hack/allocate.sh && break
41+
echo "------------------ failed, retrying... ------------------"
42+
if [ $attempt -ge $max_attempts ]; then
43+
echo "------------------ max # of retries reached, exiting ------------------"
44+
exit 1
45+
fi
46+
./hack/delete.sh
47+
done
48+
echo "------------------ finished! attempt $attempt ------------------"
3249
- name: Local Registry
3350
run: ./hack/registry.sh
34-
- name: Allocate Cluster
35-
run: ./hack/allocate.sh
3651
- name: Setup testing images
3752
run: ./hack/setup-testing-images.sh
3853
- name: Install Tekton

.github/workflows/test-podman.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,22 @@ jobs:
2424
- name: Install Binaries
2525
run: ./hack/install-binaries.sh
2626
- name: Allocate Cluster
27-
run: ./hack/allocate.sh
27+
run: |
28+
attempt=0
29+
max_attempts=5
30+
until [ $attempt -ge $max_attempts ]
31+
do
32+
attempt=$((attempt+1))
33+
echo "------------------ Attempt $attempt ------------------"
34+
./hack/allocate.sh && break
35+
echo "------------------ failed, retrying... ------------------"
36+
if [ $attempt -ge $max_attempts ]; then
37+
echo "------------------ max # of retries reached, exiting ------------------"
38+
exit 1
39+
fi
40+
./hack/delete.sh
41+
done
42+
echo "------------------ finished! attempt $attempt ------------------"
2843
- name: Local Registry
2944
run: ./hack/registry.sh
3045
- name: Setup testing images

0 commit comments

Comments
 (0)