From d4e7fd7bab89f8de0267a9f539581efad04244b2 Mon Sep 17 00:00:00 2001 From: Goutham Pratapa Date: Thu, 3 Aug 2023 19:29:24 +0530 Subject: [PATCH] fix: failing deploy-preview (#25986) --- scripts/cleanup_dp.sh | 2 +- scripts/deploy_preview.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/cleanup_dp.sh b/scripts/cleanup_dp.sh index 24c4766a9a..3d0ef5e79c 100755 --- a/scripts/cleanup_dp.sh +++ b/scripts/cleanup_dp.sh @@ -40,7 +40,7 @@ for i in $deployed_charts helm uninstall $i -n $i kubectl delete ns $i || true mongosh "mongodb+srv://$DB_USERNAME:$DB_PASSWORD@$DB_URL/$i?retryWrites=true&minPoolSize=1&maxPoolSize=10&maxIdleTimeMS=900000&authSource=admin" --eval 'db.dropDatabase()' - ACCESS_POINT_ID=$(aws efs describe-access-points --file-system-id "$APPSMITH_DP_EFS_ID" | jq -r '.AccessPoints[] | select(.Name=="'"$pr"'") | .AccessPointId') + ACCESS_POINT_ID=$(aws efs describe-access-points --file-system-id "$APPSMITH_DP_EFS_ID" | jq -r '.AccessPoints[] | select(.Name=="'"ce$pr"'") | .AccessPointId') aws efs delete-access-point --access-point-id $ACCESS_POINT_ID fi done diff --git a/scripts/deploy_preview.sh b/scripts/deploy_preview.sh index 3dd287e894..716d8eaa65 100755 --- a/scripts/deploy_preview.sh +++ b/scripts/deploy_preview.sh @@ -36,9 +36,10 @@ then ACCESS_POINT_ID=$(aws efs describe-access-points --file-system-id "$DP_EFS_ID" | jq -r '.AccessPoints[] | select(.Name=="'"$PULL_REQUEST_NUMBER"'") | .AccessPointId') aws efs delete-access-point --access-point-id $ACCESS_POINT_ID fi +echo "Create Access Point and Access Point ID" ## Use DP-EFS and create ACCESS_POINT -ACCESS_POINT=$(aws efs create-access-point --file-system-id $DP_EFS_ID --tags Key=Name,Value=$PULL_REQUEST_NUMBER) +ACCESS_POINT=$(aws efs create-access-point --file-system-id $DP_EFS_ID --tags Key=Name,Value=ce$PULL_REQUEST_NUMBER) ACCESS_POINT_ID=$(echo $ACCESS_POINT | jq -r '.AccessPointId') export NAMESPACE=ce"$PULL_REQUEST_NUMBER" @@ -70,7 +71,7 @@ kubectl create secret docker-registry $SECRET \ --docker-password=$DOCKER_HUB_ACCESS_TOKEN -n $NAMESPACE echo "Add appsmith-ee to helm repo" -helm repo add "$HELMCHART" "$HELMCHART_URL" +AWS_REGION=us-east-2 helm repo add "$HELMCHART" "$HELMCHART_URL" echo "Deploy appsmith helm chart" helm upgrade -i $CHARTNAME appsmith-ee/$HELMCHART -n $NAMESPACE --create-namespace --recreate-pods \