File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
e2e/test/lb-fw-delete-acl Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 2222 paths : ${{ steps.filter.outputs.changes }}
2323 steps :
242425+ with :
26+ ref : ${{ github.event.pull_request.head.sha }}
2527 - name : Harden Runner
2628 uses : step-security/harden-runner@v2
2729 with :
3840
3941 build-test :
4042 runs-on : ubuntu-latest
43+ environment : ${{ github.event.pull_request.head.repo.fork == true && 'prod-external' || 'prod' }}
4144 needs : changes
4245 if : ${{ contains(fromJSON(needs.changes.outputs.paths), 'src') }}
4346 steps :
6265
63666467 with :
65- fetch-depth : 0
68+ ref : ${{ github.event.pull_request.head.sha }}
6669 - uses : actions/setup-go@v5
6770 with :
6871 go-version-file : go.mod
9598
9699 docker-build :
97100 runs-on : ubuntu-latest
101+ environment : ${{ github.event.pull_request.head.repo.fork == true && 'prod-external' || 'prod' }}
98102 steps :
99103100104 with :
@@ -120,6 +124,7 @@ jobs:
120124
121125 e2e-tests :
122126 runs-on : ubuntu-latest
127+ environment : ${{ github.event.pull_request.head.repo.fork == true && 'prod-external' || 'prod' }}
123128 needs : changes
124129 if : ${{ contains(fromJSON(needs.changes.outputs.paths), 'src') }}
125130 env :
@@ -133,7 +138,7 @@ jobs:
133138 steps :
134139135140 with :
136- fetch-depth : 0
141+ ref : ${{ github.event.pull_request.head.sha }}
137142
138143 - name : Set up Go
139144 uses : actions/setup-go@v5
Original file line number Diff line number Diff line change @@ -117,6 +117,9 @@ spec:
117117 content : |
118118 set -e
119119
120+ nbid=0
121+ fwid=0
122+
120123 for i in {1..10}; do
121124 nbid=$(KUBECONFIG=$KUBECONFIG NAMESPACE=$NAMESPACE LINODE_TOKEN=$LINODE_TOKEN ../scripts/get-nb-id.sh)
122125
@@ -128,6 +131,18 @@ spec:
128131
129132 fwid=$(echo $fw | jq -r '.data[].id')
130133
134+ if [[ $nbid -ne 0 && $fwid -ne 0 ]]; then
135+ break
136+ fi
137+ sleep 2
138+ done
139+
140+ if [[ $nbid -eq 0 || $fwid -eq 0 ]]; then
141+ echo "nb or fw not found"
142+ exit 1
143+ fi
144+
145+ for i in {1..10}; do
131146 # Remove service
132147 kubectl delete service svc-test -n $NAMESPACE --ignore-not-found
133148 sleep 5
@@ -145,6 +160,7 @@ spec:
145160 -H "Authorization: Bearer $LINODE_TOKEN" \
146161 -H "accept: application/json" \
147162 "https://api.linode.com/v4/networking/firewalls/${fwid}" || true)
163+
148164 if [[ $nbRespCode == "404" && $fwRespCode == "404" ]]; then
149165 echo "nb and fw deleted"
150166 break
You can’t perform that action at this time.
0 commit comments