Skip to content

Commit

Permalink
Merge branch 'master' of github.com:eisbuk/EisBuk into enhancement/mo…
Browse files Browse the repository at this point in the history
…bile-ui
  • Loading branch information
silviot committed Dec 12, 2024
2 parents 3d3fe57 + a6cbf4f commit e846df3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflow.templates/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ name: Deploy to production
push:
branches:
- master
- test/production-deployment

jobs:
deploy:
Expand Down Expand Up @@ -54,7 +55,7 @@ jobs:
environment: production
sourcemaps: "./packages/client/dist/assets"
version: ${{ env.SENTRY_RELEASE }}
- name: Create Sentry release for client app
- name: Create Sentry release for firebase functions
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
Expand All @@ -67,11 +68,9 @@ jobs:
version: ${{ env.SENTRY_RELEASE }}
- name: Write service account key
run: |
cat > $HOME/key.json <<EOF
cat > /tmp/key.json <<EOF
${{ secrets.GCP_KEY_JSON }}
EOF
- name: Set creds env var
run: echo "GOOGLE_APPLICATION_CREDENTIALS=$HOME/key.json" >> $GITHUB_ENV
- name: Deploy to firebase
run: |
echo FUNCTIONS_SENTRY_DSN="$FUNCTIONS_SENTRY_DSN" > packages/functions/.env
Expand All @@ -80,6 +79,7 @@ jobs:
env:
FUNCTIONS_SENTRY_DSN: ${{ secrets.FUNCTIONS_SENTRY_DSN }}
REACT_APP_SENTRY_RELEASE: ${{ env.SENTRY_RELEASE }}
GOOGLE_APPLICATION_CREDENTIALS: /tmp/key.json
- name: debug
if: steps.has_secret.outputs.HAS_SECRETS && (success() || failure())
run: ls -l ; ls firebase-debug.log && cat firebase-debug.log || true
8 changes: 4 additions & 4 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Deploy to production
push:
branches:
- master
- test/production-deployment
jobs:
deploy:
environment: Production
Expand Down Expand Up @@ -62,7 +63,7 @@ jobs:
environment: production
sourcemaps: ./packages/client/dist/assets
version: ${{ env.SENTRY_RELEASE }}
- name: Create Sentry release for client app
- name: Create Sentry release for firebase functions
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
Expand All @@ -75,11 +76,9 @@ jobs:
version: ${{ env.SENTRY_RELEASE }}
- name: Write service account key
run: |
cat > $HOME/key.json <<EOF
cat > /tmp/key.json <<EOF
${{ secrets.GCP_KEY_JSON }}
EOF
- name: Set creds env var
run: echo "GOOGLE_APPLICATION_CREDENTIALS=$HOME/key.json" >> $GITHUB_ENV
- name: Deploy to firebase
run: |
echo FUNCTIONS_SENTRY_DSN="$FUNCTIONS_SENTRY_DSN" > packages/functions/.env
Expand All @@ -88,6 +87,7 @@ jobs:
env:
FUNCTIONS_SENTRY_DSN: ${{ secrets.FUNCTIONS_SENTRY_DSN }}
REACT_APP_SENTRY_RELEASE: ${{ env.SENTRY_RELEASE }}
GOOGLE_APPLICATION_CREDENTIALS: /tmp/key.json
- name: debug
if: steps.has_secret.outputs.HAS_SECRETS && (success() || failure())
run: ls -l ; ls firebase-debug.log && cat firebase-debug.log || true
17 changes: 13 additions & 4 deletions deploy-firebase.expect
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,23 @@ set timeout 240


cd packages/client/
spawn npx firebase deploy --project eisbuk
spawn npx firebase deploy --project eisbuk --debug



expect {
"*Would you like to proceed with deletion?*" {
# Some unexpected cloud functions are present. Tell firebase CLI not to delete them
send -- "N\r"
exp_continue
}
"*Deploy complete!*" {
exp_continue
}
eof {
# Deployment finished or failed
}
"*Deploy complete!*"
}

expect eof
# Capture the exit code of the spawned process and exit with the same code
set waitval [wait]
exit [lindex $waitval 3]

0 comments on commit e846df3

Please sign in to comment.