fix: failing deploy-preview (#25986)

This commit is contained in:
Goutham Pratapa 2023-08-03 19:29:24 +05:30 committed by GitHub
parent 6762d2ce90
commit d4e7fd7bab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -40,7 +40,7 @@ for i in $deployed_charts
helm uninstall $i -n $i helm uninstall $i -n $i
kubectl delete ns $i || true 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()' 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 aws efs delete-access-point --access-point-id $ACCESS_POINT_ID
fi fi
done done

View File

@ -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') 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 aws efs delete-access-point --access-point-id $ACCESS_POINT_ID
fi fi
echo "Create Access Point and Access Point ID"
## Use DP-EFS and create ACCESS_POINT ## 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') ACCESS_POINT_ID=$(echo $ACCESS_POINT | jq -r '.AccessPointId')
export NAMESPACE=ce"$PULL_REQUEST_NUMBER" export NAMESPACE=ce"$PULL_REQUEST_NUMBER"
@ -70,7 +71,7 @@ kubectl create secret docker-registry $SECRET \
--docker-password=$DOCKER_HUB_ACCESS_TOKEN -n $NAMESPACE --docker-password=$DOCKER_HUB_ACCESS_TOKEN -n $NAMESPACE
echo "Add appsmith-ee to helm repo" 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" echo "Deploy appsmith helm chart"
helm upgrade -i $CHARTNAME appsmith-ee/$HELMCHART -n $NAMESPACE --create-namespace --recreate-pods \ helm upgrade -i $CHARTNAME appsmith-ee/$HELMCHART -n $NAMESPACE --create-namespace --recreate-pods \