Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saas dev -> saas staging #684

Merged
merged 3 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/saas-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ jobs:
run: kubectl set image deployment netmaker-ui netmaker-ui=${{ github.repository_owner }}/netmaker-ui-saas:${{ env.TAG }} -n accounts

- name: Set Intercom vars
run: kubectl set env deployment netmaker-ui INTERCOM_APP_ID=al371us8 -n accounts
run: |
kubectl set env deployment netmaker-ui INTERCOM_APP_ID=al371us8 -n accounts
kubectl set env deployment netmaker-ui PUBLIC_POSTHOG_HOST=${{ secrets.REACT_APP_PUBLIC_POSTHOG_DEV_KEY }} -n accounts
kubectl set env deployment netmaker-ui PUBLIC_POSTHOG_KEY=${{ secrets.REACT_APP_PUBLIC_POSTHOG_HOST }} -n accounts

- name: Deploy to k8s cluster
run: kubectl rollout restart deploy netmaker-ui -n accounts
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/saas-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ jobs:
run: kubectl set image deployment netmaker-ui netmaker-ui=${{ github.repository_owner }}/netmaker-ui-saas:${{ env.TAG }} -n accounts

- name: Set Intercom vars
run: kubectl set env deployment netmaker-ui INTERCOM_APP_ID=al371us8 -n accounts

run: |
kubectl set env deployment netmaker-ui INTERCOM_APP_ID=al371us8 -n accounts
kubectl set env deployment netmaker-ui PUBLIC_POSTHOG_HOST=${{ secrets.REACT_APP_PUBLIC_POSTHOG_KEY }} -n accounts
kubectl set env deployment netmaker-ui PUBLIC_POSTHOG_KEY=${{ secrets.REACT_APP_PUBLIC_POSTHOG_HOST }} -n accounts

- name: Deploy to k8s cluster
run: kubectl rollout restart deploy netmaker-ui -n accounts

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/saas-deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ jobs:
run: kubectl set image deployment netmaker-ui netmaker-ui=${{ github.repository_owner }}/netmaker-ui-saas:${{ env.TAG }} -n accounts

- name: Set Intercom vars
run: kubectl set env deployment netmaker-ui INTERCOM_APP_ID=al371us8 -n accounts
run: |
kubectl set env deployment netmaker-ui INTERCOM_APP_ID=al371us8 -n accounts
kubectl set env deployment netmaker-ui PUBLIC_POSTHOG_HOST=${{ secrets.REACT_APP_PUBLIC_POSTHOG_DEV_KEY }} -n accounts
kubectl set env deployment netmaker-ui PUBLIC_POSTHOG_KEY=${{ secrets.REACT_APP_PUBLIC_POSTHOG_HOST }} -n accounts

- name: Deploy to k8s cluster
run: kubectl rollout restart deploy netmaker-ui -n accounts
Expand Down
14 changes: 14 additions & 0 deletions generate-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,26 @@ if [ -z "${INTERCOM_APP_ID:-}" ]; then
INTERCOM_APP_ID=""
fi

# ensure it is empty string if not set
if [ -z "${PUBLIC_POSTHOG_HOST:-}" ]; then
PUBLIC_POSTHOG_HOST=""
fi

# ensure it is empty string if not set
if [ -z "${PUBLIC_POSTHOG_KEY:-}" ]; then
PUBLIC_POSTHOG_KEY=""
fi

cat >/usr/share/nginx/html/nmui-config.js <<EOF
window.NMUI_AMUI_URL='$AMUI_URL';
window.NMUI_BACKEND_URL='$BACKEND_URL';
window.NMUI_INTERCOM_APP_ID='$INTERCOM_APP_ID';
window.NMUI_PUBLIC_POSTHOG_HOST='$PUBLIC_POSTHOG_HOST';
window.NMUI_PUBLIC_POSTHOG_KEY='$PUBLIC_POSTHOG_KEY';
EOF

echo ">>>> NMUI_AMUI_URL set to: $AMUI_URL <<<<<"
echo ">>>> NMUI_BACKEND_URL set to: $BACKEND_URL <<<<<"
echo ">>>> NMUI_INTERCOM_APP_ID set to: $INTERCOM_APP_ID <<<<<"
echo ">>>> NMUI_PUBLIC_POSTHOG_HOST set to: $PUBLIC_POSTHOG_HOST <<<<<"
echo ">>>> NMUI_PUBLIC_POSTHOG_KEY set to: ***** <<<<<"
Loading
Loading