Skip to content

Commit

Permalink
fix: fixing alb tag in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
caiocsgomes committed Aug 31, 2024
1 parent 1356c64 commit af6dfaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/argo-cd-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ jobs:
- name: set dns record to alb
run: |
## Get the ALB ARN
alb_arn=$(aws elbv2 describe-load-balancers --region ${{ secrets.AWS_REGION }} | jq -r '.LoadBalancers[].LoadBalancerArn' | xargs -I {} aws --region ${{ secrets.AWS_REGION }} elbv2 describe-tags --resource-arns {} --query "TagDescriptions[?Tags[?Key=='ingress.k8s.aws/stack' &&Value=='eks-lab-ingress']].ResourceArn" --output text)
alb_arn=$(aws elbv2 describe-load-balancers --region ${{ secrets.AWS_REGION }} | jq -r '.LoadBalancers[].LoadBalancerArn' | xargs -I {} aws --region ${{ secrets.AWS_REGION }} elbv2 describe-tags --resource-arns {} --query "TagDescriptions[?Tags[?Key=='ingress.k8s.aws/stack' &&Value=='ci-cluster-ingress']].ResourceArn" --output text)
while true; do
if [ -z "$alb_arn" ]; then
echo "ALB not found, waiting 10 seconds"
sleep 10
alb_arn=$(aws elbv2 describe-load-balancers --region ${{ secrets.AWS_REGION }} | jq -r '.LoadBalancers[].LoadBalancerArn' | xargs -I {} aws --region ${{ secrets.AWS_REGION }} elbv2 describe-tags --resource-arns {} --query "TagDescriptions[?Tags[?Key=='ingress.k8s.aws/stack' &&Value=='eks-lab-ingress']].ResourceArn" --output text)
alb_arn=$(aws elbv2 describe-load-balancers --region ${{ secrets.AWS_REGION }} | jq -r '.LoadBalancers[].LoadBalancerArn' | xargs -I {} aws --region ${{ secrets.AWS_REGION }} elbv2 describe-tags --resource-arns {} --query "TagDescriptions[?Tags[?Key=='ingress.k8s.aws/stack' &&Value=='ci-cluster-ingress']].ResourceArn" --output text)
continue
fi
break
Expand Down

0 comments on commit af6dfaa

Please sign in to comment.