Skip to content

Commit 20398b3

Browse files
committed
Change ordering of the variable in .sh
1 parent 61a4b73 commit 20398b3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/appsignals-e2e-eks-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ jobs:
159159
${{ inputs.test-cluster-name }} \
160160
${{ inputs.aws-region }} \
161161
${{ env.SAMPLE_APP_NAMESPACE }}" \
162-
60 \
163162
"${{ env.TEST_RESOURCES_FOLDER }}/enablement-script/clean-app-signals.sh \
164163
${{ inputs.test-cluster-name }} \
165164
${{ inputs.aws-region }} \
166165
${{ 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
168168
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
171171
172172
echo "Attempting to connect to the main sample app endpoint"
173173
main_sample_app_endpoint=http://$(terraform output sample_app_endpoint)

.github/workflows/util/execute_and_retry.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
# This function is for retrying commands in the case they fail. It accepts three arguments
44
# $1: Number of retries it will attempt
55
# $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
88
execute_and_retry () {
99
# Warning: The variables called in this function are not local and will be shared with the calling function.
1010
# Make sure that the variable names do not conflict
1111
execute_retry_counter=0
1212
max_execute_retry=$1
1313
command=$2
14-
sleep_time=$3
15-
cleanup=$4
14+
cleanup=$3
15+
sleep_time=$4
1616
echo "Initiating execute_and_retry.sh script for command $command"
1717
while [ $execute_retry_counter -lt $max_execute_retry ]; do
1818
echo "Attempt Number $execute_retry_counter for execute_and_retry.sh"

0 commit comments

Comments
 (0)