Skip to content

Commit

Permalink
si
Browse files Browse the repository at this point in the history
  • Loading branch information
Paramadon committed Jan 15, 2025
1 parent 9e9bf43 commit 0538bed
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/ec2-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ jobs:

# nick-fields/retry@v2 starts at base dir
- name: Terraform apply
if: steps.cache_if_success.outputs.cache-hit != 'true'
uses: nick-fields/retry@v2
with:
max_attempts: 2
Expand All @@ -95,7 +94,7 @@ jobs:
fi
terraform init
if terraform apply --auto-approve \
terraform apply --auto-approve \
-var="ssh_key_value=${{env.PRIVATE_KEY}}" -var="github_test_repo=${{ inputs.test_repo_url }}" \
-var="test_name=${{ matrix.arrays.os }}" \
-var="cwa_github_sha=${{inputs.github_sha}}" -var="install_agent=${{ matrix.arrays.installAgentCommand }}" \
Expand All @@ -113,16 +112,4 @@ jobs:
-var="excluded_tests='${{ matrix.arrays.excludedTests }}'" \
-var="ssh_key_name=${{env.KEY_NAME}}" \
-var="test_dir=${{ matrix.arrays.test_dir }}" \
-var="agent_start=${{ matrix.arrays.agentStartCommand }}"; then terraform destroy -var="region=${{ inputs.region }}" -var="ami=${{ matrix.arrays.ami }}" -auto-approve
else
terraform destroy -var="region=${{ inputs.region }}" -var="ami=${{ matrix.arrays.ami }}" -auto-approve && exit 1
fi
#This is here just in case workflow cancel
- name: Terraform destroy
if: ${{ cancelled() || failure() }}
uses: nick-fields/retry@v2
with:
max_attempts: 2
timeout_minutes: 8
retry_wait_seconds: 5
command: cd ${{ inputs.test_dir }} && terraform destroy -var="region=${{ inputs.region }}" -var="ami=${{ matrix.arrays.ami }}" --auto-approve
-var="agent_start=${{ matrix.arrays.agentStartCommand }}"

0 comments on commit 0538bed

Please sign in to comment.