Skip to content

Commit

Permalink
add new conditional step
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanthreddy29 committed Oct 3, 2024
1 parent 0ac303c commit 38c5348
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions steps/engine/clusterloader2/autoscale/collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ steps:
- script: |
kubectl delete --all nodeclaim --ignore-not-found
kubectl delete --all nodepool --ignore-not-found
displayName: "Delete NodeClaim and NodePool and Network Interfaces"
condition: always()

- ${{ if eq(parameters.cloud, 'aws') }}:
- script: |
echo "Delete all the network interfaces"
subnet_ids=$(aws ec2 describe-subnets --query "Subnets[?Tags[?Key=='run_id' && Value=='$RUN_ID']].SubnetId" --output text)

Check failure on line 21 in steps/engine/clusterloader2/autoscale/collect.yml

View workflow job for this annotation

GitHub Actions / lint-checker

21:5 syntax error: could not find expected ':' (syntax)
for subnet_id in $subnet_ids; do
Expand All @@ -32,8 +36,8 @@ steps:
fi
done
done
displayName: "Delete NodeClaim, NodePool and Network Interfaces"
condition: always()
displayName: "AWS Garbage Cleanup"

Check failure on line 39 in steps/engine/clusterloader2/autoscale/collect.yml

View workflow job for this annotation

GitHub Actions / lint-checker

39:37 [trailing-spaces] trailing spaces

- template: /steps/cloud/${{ parameters.cloud }}/collect-cloud-info.yml
parameters:
region: ${{ parameters.region }}
Expand Down

0 comments on commit 38c5348

Please sign in to comment.