Repository navigation
Add production migrate workflow before source map deploy - #673
Merged
Merged
Conversation
Co-authored-by: Sanja Malovic <[email protected]>
Comment on lines
+17
to
+48
| runs-on: ubuntu-latest | ||
| environment: production | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: pnpm | ||
| - run: pnpm install --frozen-lockfile | ||
| - name: Migrate production database | ||
| if: inputs.phase == 'migrate' | ||
| working-directory: apps/api | ||
| env: | ||
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
| run: pnpm exec prisma migrate deploy | ||
| - name: Verify source_map_upload column | ||
| if: inputs.phase == 'migrate' | ||
| working-directory: apps/api | ||
| env: | ||
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
| run: node scripts/production-source-map-smoke.mjs verify | ||
| - name: Build SDKs for crash smoke | ||
| if: inputs.phase == 'smoke' | ||
| run: pnpm --filter @telemetry-tracker/core build && pnpm --filter @telemetry-tracker/node build | ||
| - name: Production smoke | ||
| if: inputs.phase == 'smoke' | ||
| working-directory: apps/api | ||
| env: | ||
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
| API_BASE_URL: https://api.telemetry-tracker.com | ||
| run: node scripts/production-source-map-smoke.mjs smoke |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One-shot production workflow so
prisma migrate deployruns against the production database before the API that readssource_map_uploadis promoted.phase=migrateapplies migrations and checks the column.phase=smokeruns after the new API is live.Secrets are not printed.
Checklist
DATABASE_URLenvironment secret