Skip to content

Commit

Permalink
chore: injecting env value into client build script (#35288)
Browse files Browse the repository at this point in the history
## Description
The `APPSMITH_CLOUD_HOSTING` env value is not accessible within the
client build script, we are fixing it by injecting it in the client
build workflow.

Fixes #35184
> [!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="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10161480342>
> Commit: 443c4ab
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10161480342&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Tue, 30 Jul 2024 11:57:03 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **Chores**
- Enhanced visibility of environment variables during the build process
with a debug echo statement.
- Introduced the `APPSMITH_CLOUD_HOSTING` environment variable in the
GitHub Actions workflow, improving configurability for various
deployment scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
vsvamsi1 authored Jul 30, 2024
1 parent 28c8c5a commit 08fda97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/client-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ jobs:
export REACT_APP_SEGMENT_CE_KEY="${{ secrets.APPSMITH_SEGMENT_CE_KEY_RELEASE }}"
fi
REACT_APP_ENVIRONMENT=${{steps.vars.outputs.REACT_APP_ENVIRONMENT}} \
APPSMITH_CLOUD_HOSTING=${{ secrets.APPSMITH_CLOUD_HOSTING }} \
REACT_APP_FUSIONCHARTS_LICENSE_KEY=${{ secrets.APPSMITH_FUSIONCHARTS_LICENSE_KEY }} \
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} \
REACT_APP_VERSION_EDITION="Community" \
Expand Down
1 change: 1 addition & 0 deletions app/client/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export REACT_APP_SENTRY_RELEASE=$GIT_SHA
export REACT_APP_CLIENT_LOG_LEVEL=ERROR
# Disable CRA built-in ESLint checks since we have our own config and a separate step for this
export DISABLE_ESLINT_PLUGIN=true
echo "debug client build setting $APPSMITH_CLOUD_HOSTING"
if [ "$APPSMITH_CLOUD_HOSTING" == "true" ]; then
echo "Building profiled build"
craco --max-old-space-size=7168 build --profile --config craco.build.config.js --verbose
Expand Down

0 comments on commit 08fda97

Please sign in to comment.