From 73d3960121a3c79e958cc9fb1aa4978c79fddf45 Mon Sep 17 00:00:00 2001 From: Abhijeet <41686026+abhvsn@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:29:20 +0530 Subject: [PATCH] chore: Exit the script if server artifact placer is not available (#36569) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description PR to fail fast at the build step only if the script to place the server artifacts for pg and mongo is not available. This PR also replaces pg tag with nightly tag for placing the server artifacts for pg to improve the stability of the image shipped to customers. Fixes: https://github.com/appsmithorg/appsmith/issues/36478 /test Sanity ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 40c56218e2cb487cc79bdaab92abc53ded89b4fb > Cypress dashboard. > Tags: `@tag.Sanity` > Spec: >
Thu, 26 Sep 2024 11:23:28 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No ## Summary by CodeRabbit - **Bug Fixes** - Improved error handling for missing scripts in the build and release workflows, ensuring clearer error messages and preventing process failures. - **Chores** - Introduced a new environment variable for using the nightly PostgreSQL Docker image in the release process. --- .github/workflows/github-release.yml | 6 +++++- .github/workflows/test-build-docker-image.yml | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index c4dd4001beb8..cedac1f84817 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -247,10 +247,14 @@ jobs: run: | scripts/generate_info_json.sh + # As pg docker image is continuously updated for each scheduled cron on release, we are using the nightly tag while building the latest tag - name: Place server artifacts-es run: | if [[ -f scripts/prepare_server_artifacts.sh ]]; then - scripts/prepare_server_artifacts.sh + PG_TAG=nightly scripts/prepare_server_artifacts.sh + else + echo "No script found to prepare server artifacts" + exit 1 fi - name: Login to DockerHub diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml index f14c565e210a..e3c21798e6a7 100644 --- a/.github/workflows/test-build-docker-image.yml +++ b/.github/workflows/test-build-docker-image.yml @@ -356,8 +356,12 @@ jobs: - name: Place server artifacts-es run: | + run: | if [[ -f scripts/prepare_server_artifacts.sh ]]; then scripts/prepare_server_artifacts.sh + else + echo "No script found to prepare server artifacts" + exit 1 fi - name: Set up Depot CLI @@ -439,6 +443,9 @@ jobs: run: | if [[ -f scripts/prepare_server_artifacts.sh ]]; then scripts/prepare_server_artifacts.sh + else + echo "No script found to prepare server artifacts" + exit 1 fi - name: Set up Depot CLI