From 3bac05feeb0b5997f10cdaa026ed764e6a2ef06b Mon Sep 17 00:00:00 2001 From: Goutham Pratapa Date: Wed, 25 Jun 2025 19:08:25 +0530 Subject: [PATCH] =?UTF-8?q?refactor:=20enhance=20deploy=5Fpreview.sh=20scr?= =?UTF-8?q?ipt=20for=20improved=20AWS=20configura=E2=80=A6=20(#41042)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …tion ### Changes Made - Updated the script to set strict error handling with `set -euo pipefail`. - Streamlined AWS CLI configuration by creating the `~/.aws/config` file directly. - Removed deprecated `dp-node-affinity-values.yaml` file and integrated node affinity and tolerations directly into the Helm chart deployment command. - Improved pod name retrieval and added optional cleanup logic for better resource management during deployment. These changes enhance the reliability and maintainability of the deployment process. ## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="" ### :mag: Cypress test results > [!CAUTION] > If you modify the content in this section, you are likely to disrupt the CI result for your PR. ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No --- scripts/deploy_preview.sh | 88 +++++++++++++++------------- scripts/dp-node-affinity-values.yaml | 15 ----- 2 files changed, 47 insertions(+), 56 deletions(-) delete mode 100644 scripts/dp-node-affinity-values.yaml diff --git a/scripts/deploy_preview.sh b/scripts/deploy_preview.sh index d807fca48c..31cafef1bb 100755 --- a/scripts/deploy_preview.sh +++ b/scripts/deploy_preview.sh @@ -1,27 +1,30 @@ #!/bin/bash # Params are in environment variables as PARAM_{SLUG}, e.g. PARAM_USER_ID -edition=ce +set -euo pipefail -# Configure the AWS & kubectl environment +edition="ce" -mkdir ~/.aws; touch ~/.aws/config +# Configure AWS CLI and kubectl environment +mkdir -p ~/.aws +cat > ~/.aws/config <