File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -159,15 +159,15 @@ jobs:
159
159
${{ inputs.test-cluster-name }} \
160
160
${{ inputs.aws-region }} \
161
161
${{ env.SAMPLE_APP_NAMESPACE }}" \
162
- 60 \
163
162
"${{ env.TEST_RESOURCES_FOLDER }}/enablement-script/clean-app-signals.sh \
164
163
${{ inputs.test-cluster-name }} \
165
164
${{ inputs.aws-region }} \
166
165
${{ env.SAMPLE_APP_NAMESPACE }} && \
167
- aws eks update-kubeconfig --name ${{ inputs.test-cluster-name }} --region ${{ inputs.aws-region }}"
166
+ aws eks update-kubeconfig --name ${{ inputs.test-cluster-name }} --region ${{ inputs.aws-region }}" \
167
+ 60
168
168
169
- execute_and_retry 2 "kubectl delete pods --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" 60
170
- execute_and_retry 2 "kubectl wait --for=condition=Ready --request-timeout '5m' pod --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" 10
169
+ execute_and_retry 2 "kubectl delete pods --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" "" 60
170
+ execute_and_retry 2 "kubectl wait --for=condition=Ready --request-timeout '5m' pod --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" "" 10
171
171
172
172
echo "Attempting to connect to the main sample app endpoint"
173
173
main_sample_app_endpoint=http://$(terraform output sample_app_endpoint)
Original file line number Diff line number Diff line change 3
3
# This function is for retrying commands in the case they fail. It accepts three arguments
4
4
# $1: Number of retries it will attempt
5
5
# $2: Command to execute
6
- # $3: (Optional) Sleep time between run. Default value is 10 seconds
7
- # $4: (Optional) Command for cleaning up resources if $2 fails. If this variable needs to be used then the sleep time has to be defined first
6
+ # $3: (Optional) Command for cleaning up resources if $2 fails.
7
+ # $4: (Optional) Sleep time between run. Default value is 10 seconds
8
8
execute_and_retry () {
9
9
# Warning: The variables called in this function are not local and will be shared with the calling function.
10
10
# Make sure that the variable names do not conflict
11
11
execute_retry_counter=0
12
12
max_execute_retry=$1
13
13
command=$2
14
- sleep_time =$3
15
- cleanup =$4
14
+ cleanup =$3
15
+ sleep_time =$4
16
16
echo " Initiating execute_and_retry.sh script for command $command "
17
17
while [ $execute_retry_counter -lt $max_execute_retry ]; do
18
18
echo " Attempt Number $execute_retry_counter for execute_and_retry.sh"
You can’t perform that action at this time.
0 commit comments