chore: Fail early when build of one component fails (#33958)
Fail early when build of one of the components fails, instead of proceeding to build the Docker image and failing _much_ later. [Slack conversation](https://theappsmith.slack.com/archives/C02MUD8DNUR/p1717484636886919). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Improved the build process with better error handling for server, client, and RTS components, ensuring clearer messaging in case of build failures. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
9cd1be5014
commit
05690f8339
|
|
@ -79,15 +79,32 @@ fi
|
||||||
|
|
||||||
pretty_print "Starting server build ..."
|
pretty_print "Starting server build ..."
|
||||||
|
|
||||||
pushd app/server > /dev/null && ./build.sh -DskipTests > /dev/null && pretty_print "Server build successful. Starting client build ..."
|
pushd app/server > /dev/null
|
||||||
|
if ! ./build.sh -DskipTests > /dev/null; then
|
||||||
|
echo Server build failed >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
pretty_print "Server build successful. Starting client build ..."
|
||||||
|
|
||||||
popd
|
popd
|
||||||
pushd app/client > /dev/null && yarn > /dev/null && yarn build > /dev/null && pretty_print "Client build successful. Starting RTS build ..."
|
pushd app/client > /dev/null
|
||||||
|
yarn > /dev/null
|
||||||
|
if ! yarn build > /dev/null; then
|
||||||
|
echo Client build failed >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
pretty_print "Client build successful. Starting RTS build ..."
|
||||||
|
|
||||||
popd
|
popd
|
||||||
pushd app/client/packages/rts/ > /dev/null && ./build.sh > /dev/null && pretty_print "RTS build successful. Starting Docker build ..."
|
pushd app/client/packages/rts/ > /dev/null
|
||||||
|
if ! ./build.sh > /dev/null; then
|
||||||
|
echo RTS build failed >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
pretty_print "RTS build successful. Starting Docker build ..."
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
bash "$(dirname "$0")/generate_info_json.sh"
|
||||||
docker build -t appsmith/appsmith-ce:local-testing \
|
docker build -t appsmith/appsmith-ce:local-testing \
|
||||||
--build-arg BASE="appsmith/base-$edition:release" \
|
--build-arg BASE="appsmith/base-$edition:release" \
|
||||||
--build-arg APPSMITH_CLOUD_SERVICES_BASE_URL="${cs_url:-https://release-cs.appsmith.com}" \
|
--build-arg APPSMITH_CLOUD_SERVICES_BASE_URL="${cs_url:-https://release-cs.appsmith.com}" \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user