Skip to content

Commit

Permalink
fix(names): namespacing all packages (#1007)
Browse files Browse the repository at this point in the history
* fix(names): namespacing all packages

* fix(names): updating name builds

* fix(local): ensuring github actions use the local files
  • Loading branch information
bassrock authored Jan 7, 2025
1 parent 4996cff commit 51e504d
Show file tree
Hide file tree
Showing 90 changed files with 201 additions and 274 deletions.
14 changes: 2 additions & 12 deletions .github/actions/build-lambda/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runs:
using: 'composite'
steps:
- name: Install pnpm & node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@main
uses: ./.github/actions/install-pnpm-and-node
with:
scope: ${{ inputs['scope'] }}
# Theres a really annoying bug in PNPM deploy command that will try and create a folder at /home/pruned which we are not allowed to do,
Expand Down Expand Up @@ -73,14 +73,4 @@ runs:
if [[ -z $s3Key ]]; then
s3Key="${{ github.sha }}.zip"
fi
aws s3 cp ~/${{ github.sha }}.zip s3://${{inputs.s3-bucket}}/${s3Key}
- uses: actions/upload-artifact@v4
if: inputs.s3-key == ''
with:
name: ${{inputs.scope}}
path: ~/${{ github.sha }}.zip
- uses: actions/upload-artifact@v4
if: inputs.s3-key != ''
with:
name: ${{ inputs.s3-key }}
path: ~/${{ github.sha }}.zip
aws s3 cp ~/${{ github.sha }}.zip s3://${{inputs.s3-bucket}}/${s3Key}
2 changes: 1 addition & 1 deletion .github/actions/cdktf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ runs:
${{ runner.os }}-tfenv-
- name: Install pnpm & node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@main
uses: ./.github/actions/install-pnpm-and-node
with:
scope: ${{ inputs['scope'] }}

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/account-data-deleter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@ jobs:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/reuse-test-integrations.yml
with:
scope: account-data-deleter
scope: '@server/account-data-deleter'
secrets: inherit

infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: account-data-deleter-cdk
scope: '@infrastructure/account-data-deleter'
stack-output-path: infrastructure/account-data-deleter/cdktf.out/stacks/account-data-deleter
secrets: inherit

api:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: account-data-deleter
scope: '@server/account-data-deleter'
app-path: servers/account-data-deleter
app-port: 4015
sentry-project: account-data-deleter
Expand All @@ -59,7 +59,7 @@ jobs:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
needs: [infrastructure]
with:
scope: account-data-deleter-events
scope: '@lambda/account-data-deleter-events'
sentry-project: account-data-deleter
s3-bucket-pattern: pocket-accountdatadeleter-{0}-sqs-event-consumer
codedeploy-app-name-pattern: AccountDataDeleter-{0}-Sqs-Event-Consumer-Lambda
Expand All @@ -71,7 +71,7 @@ jobs:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
needs: [infrastructure]
with:
scope: account-data-deleter-batch-delete
scope: '@lambda/account-data-deleter-batch-delete'
sentry-project: account-data-deleter
s3-bucket-pattern: pocket-accountdatadeleter-{0}-batchdeletelambda
codedeploy-app-name-pattern: AccountDataDeleter-{0}-BatchDeleteLambda-Lambda
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/account-delete-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/reuse-test-integrations.yml
with:
scope: account-delete-monitor
scope: '@lambda/account-delete-monitor'
secrets: inherit

infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: account-delete-monitor-cdk
scope: '@infrastructure/account-delete-monitor'
stack-output-path: infrastructure/account-delete-monitor/cdktf.out/stacks/account-delete-monitor
secrets: inherit

Expand All @@ -43,7 +43,7 @@ jobs:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
needs: [infrastructure]
with:
scope: account-delete-monitor
scope: '@lambda/account-delete-monitor'
sentry-project: account-delete-monitor
s3-bucket-pattern: pocket-accountdeletemonitor-{0}-eventtracker
codedeploy-app-name-pattern: AccountDeleteMonitor-{0}-EventTracker-Lambda
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/annotations-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/reuse-test-integrations.yml
with:
scope: annotations-api
scope: '@server/annotations-api'
secrets: inherit

apollo:
Expand All @@ -43,22 +43,22 @@ jobs:
schema-file-path: servers/annotations-api/dist/schema-generated.graphql
prod-graph-url: https://annotations-api.readitlater.com
dev-graph-url: https://annotations-api.getpocket.dev
scope: annotations-api
scope: '@server/annotations-api'
secrets:
apollo-key: ${{ secrets.APOLLO_CLIENT_API_KEY }}

infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: annotations-api-cdk
scope: '@infrastructure/annotations-api'
stack-output-path: infrastructure/annotations-api/cdktf.out/stacks/annotations-api
secrets: inherit

api:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: annotations-api
scope: '@server/annotations-api'
app-path: servers/annotations-api
app-port: 4008
sentry-project: annotations-api
Expand All @@ -70,7 +70,7 @@ jobs:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
needs: [infrastructure]
with:
scope: annotations-api-events-lambda
scope: '@lambda/annotations-api-events'
sentry-project: annotations-api
s3-bucket-pattern: pocket-annotationsapi-{0}-sqs-event-consumer
codedeploy-app-name-pattern: AnnotationsAPI-{0}-Sqs-Event-Consumer-Lambda
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/braze-content-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ jobs:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/reuse-test-integrations.yml
with:
scope: braze-content-proxy
scope: '@server/braze-content-proxy'
secrets: inherit

infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: braze-content-proxy-cdk
scope: '@infrastructure/braze-content-proxy'
stack-output-path: infrastructure/braze-content-proxy/cdktf.out/stacks/braze-content-proxy
secrets: inherit

api:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: braze-content-proxy
scope: '@server/braze-content-proxy'
app-path: servers/braze-content-proxy
app-port: 4500
sentry-project: braze-content-proxy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/braze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: braze-cdk
scope: '@infrastructure/braze'
stack-output-path: infrastructure/braze/cdktf.out/stacks/braze
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/client-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: client-api-cdk
scope: '@infrastructure/client-api'
stack-output-path: infrastructure/client-api/cdktf.out/stacks/client-api
secrets: inherit

api:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: client-api
scope: '@server/client-api'
docker-repo-name-pattern: clientapi-{0}-app
context: servers/client-api
app-path: servers/client-api
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/feature-flags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ jobs:
infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: feature-flags-cdk
scope: '@infrastructure/feature-flags'
stack-output-path: infrastructure/feature-flags/cdktf.out/stacks/feature-flags
secrets: inherit

api:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: feature-flags
scope: '@server/feature-flags'
app-path: servers/feature-flags
app-port: 4242
sentry-project: feature-flags
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/fxa-webhook-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ jobs:
infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: fxa-webhook-proxy-cdk
scope: '@infrastructure/fxa-webhook-proxy'
stack-output-path: infrastructure/fxa-webhook-proxy/cdktf.out/stacks/fxa-webhook-proxy
secrets: inherit

sqs-lambda:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
needs: [infrastructure]
with:
scope: fxa-webhook-proxy-sqs
scope: '@lambda/fxa-webhook-proxy-sqs'
sentry-project: fxa-webhook-proxy
s3-bucket-pattern: pocket-fxawebhookproxy-{0}-sqs-fxa-events
codedeploy-app-name-pattern: FxAWebhookProxy-{0}-Sqs-FxA-Events-Lambda
Expand All @@ -49,7 +49,7 @@ jobs:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
needs: [infrastructure]
with:
scope: fxa-webhook-proxy-gateway
scope: '@lambda/fxa-webhook-proxy-gateway'
sentry-project: fxa-webhook-proxy
s3-bucket-pattern: pocket-fxawebhookproxy-{0}-apigateway-fxa-events
codedeploy-app-name-pattern: FxAWebhookProxy-{0}-ApiGateway-FxA-Events-Lambda
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/image-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/reuse-test-integrations.yml
with:
scope: image-api
scope: '@server/image-api'
secrets: inherit

apollo:
Expand Down Expand Up @@ -57,15 +57,15 @@ jobs:
infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: image-api-cdk
scope: '@infrastructure/image-api'
stack-output-path: infrastructure/image-api/cdktf.out/stacks/image-api
secrets: inherit

api:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: image-api
scope: '@server/image-api'
app-path: servers/image-api
app-port: 4867
sentry-project: image-api
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/instant-sync-events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: instant-sync-events-cdk
scope: '@infrastructure/instant-sync-events'
stack-output-path: infrastructure/instant-sync-events/cdktf.out/stacks/instant-sync-events
secrets: inherit

lambda:
uses: ./.github/workflows/reuse-build-and-push-lambda.yml
needs: [infrastructure]
with:
scope: instant-sync-events
scope: '@lambda/instant-sync-events'
sentry-project: instant-sync-events
s3-bucket-pattern: pocket-instantsyncevents-{0}-eventtracker
codedeploy-app-name-pattern: InstantSyncEvents-{0}-EventTracker-Lambda
Expand All @@ -48,6 +48,6 @@ jobs:
uses: ./.github/workflows/reuse-sentry-release.yml
needs: [lambda]
with:
sentry-project: annotations-api
sentry-project: instant-sync-events
sentry-environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'development' }}
secrets: inherit
8 changes: 4 additions & 4 deletions .github/workflows/list-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/reuse-test-integrations.yml
with:
scope: list-api
scope: '@server/list-api'
secrets: inherit

apollo:
Expand All @@ -42,22 +42,22 @@ jobs:
schema-file-path: servers/list-api/dist/schema-generated.graphql
prod-graph-url: https://list-api.readitlater.com
dev-graph-url: https://list-api.getpocket.dev
scope: list-api
scope: '@server/list-api'
secrets:
apollo-key: ${{ secrets.APOLLO_CLIENT_API_KEY }}

infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: list-api-cdk
scope: '@infrastructure/list-api'
stack-output-path: infrastructure/list-api/cdktf.out/stacks/list-api
secrets: inherit

api:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: list-api
scope: '@server/list-api'
app-path: servers/list-api
app-port: 4005
sentry-project: list-api
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/notes-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/reuse-test-integrations.yml
with:
scope: notes-api
scope: '@server/notes-api'
secrets: inherit

apollo:
Expand All @@ -40,22 +40,22 @@ jobs:
schema-file-path: servers/notes-api/dist/schema-generated.graphql
prod-graph-url: https://notes.readitlater.com
dev-graph-url: https://notes.getpocket.dev
scope: notes-api
scope: '@server/notes-api'
secrets:
apollo-key: ${{ secrets.APOLLO_CLIENT_API_KEY }}

infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: notes-api-cdk
scope: '@infrastructure/notes-api'
stack-output-path: infrastructure/notes-api/cdktf.out/stacks/notes-api
secrets: inherit

api:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: notes-api
scope: '@server/notes-api'
app-path: servers/notes-api
app-port: 4029
sentry-project: notes-api
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/otel-collector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
infrastructure:
uses: ./.github/workflows/reuse-infrastructure.yml
with:
scope: otel-collector-cdk
scope: '@infrastructure/otel-collector'
stack-output-path: infrastructure/otel-collector/cdktf.out/stacks/otel-collector
secrets: inherit

api:
uses: ./.github/workflows/reuse-build-and-push-image.yml
needs: [infrastructure]
with:
scope: otel-collector
scope: '@server/otel-collector'
docker-repo-name-pattern: otelcollector-{0}-app
context: servers/otel-collector
app-path: servers/otel-collector
Expand Down
Loading

0 comments on commit 51e504d

Please sign in to comment.