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

chore(ci): move to GitHub actions #678

Merged
merged 60 commits into from
Aug 21, 2024
Merged
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
6974980
chore(ci): adding in repo based ci
bassrock Aug 14, 2024
a1e7a7a
chore(ci): moving to a composite action
bassrock Aug 14, 2024
679dbfe
chore(ci): moving to a composite action
bassrock Aug 14, 2024
8136c00
chore(ci): moving to a composite action
bassrock Aug 14, 2024
e400c82
chore(ci): removing circleci
bassrock Aug 14, 2024
cce74f2
Merge branch 'main' into github-actions
bassrock Aug 14, 2024
c3e1306
chore(ci): adding in skeleton of user_api
bassrock Aug 14, 2024
18ca91d
chore(ci): adding in skeleton of user_api
bassrock Aug 14, 2024
11e6f98
chore(ci): adding in docker compose test integrations
bassrock Aug 14, 2024
cbf54ec
chore(ci): adding in dockerhub login
bassrock Aug 14, 2024
9a4ca8a
chore(list): adding in list api
bassrock Aug 14, 2024
263b21f
chore(ci): localstack ready
bassrock Aug 14, 2024
ebb6abc
fix(localstack): allowing it to wait longer
bassrock Aug 14, 2024
9307259
fix(naming): adjusting naming of actions
bassrock Aug 14, 2024
3b34aad
chore(ci): adding in docker image building
bassrock Aug 14, 2024
f1f25e8
fix(docker): adding in docker building
bassrock Aug 14, 2024
8446800
Merge branch 'main' into github-actions
bassrock Aug 15, 2024
f637635
fix(ci): status checks
bassrock Aug 15, 2024
c1d6c74
fix(infra): adding in infrastruicture and docs
bassrock Aug 15, 2024
54fe08c
chore(ci): adding in raw terraform commands
bassrock Aug 15, 2024
f5f82da
chore(ci): testing aws
bassrock Aug 15, 2024
c4f967e
fix(lambda): adding in lambda building
bassrock Aug 15, 2024
f6308ec
chore(ci): test pushing to s3
bassrock Aug 15, 2024
8e8946b
chore(ci): test pushing docker image
bassrock Aug 15, 2024
98bd2db
fix(ci): removing tempoary uploading on pull request
bassrock Aug 15, 2024
a07bd0b
chore(ci): add in codedeploy for ecs
bassrock Aug 15, 2024
c2b5f26
fix(ci): updating ci names
bassrock Aug 15, 2024
e7dfec2
fix(snapshots): updating terrraform snapshots
bassrock Aug 16, 2024
7c68443
fix(lambda): adding in lambda deployments
bassrock Aug 16, 2024
b9ec61e
fix(sentry/apollo): adding in sentry and apollo checks
bassrock Aug 16, 2024
65b4fd4
fix(apollo): removing extra github actions
bassrock Aug 16, 2024
2c1698b
fix(github): adding github status checks
bassrock Aug 16, 2024
dd05db8
chore(ci): adding in account delete monitor
bassrock Aug 16, 2024
c6d2038
fix(blue/green): comment out blue green wait for now
bassrock Aug 16, 2024
96bcb11
chore(ci): adding in annotations api
bassrock Aug 16, 2024
8cabf6a
chore(ci): adding in braze and client api
bassrock Aug 16, 2024
2964d16
chore(ci): adding in feature flags
bassrock Aug 16, 2024
9fd0609
chore(ci): adding in fxa webhook proxy
bassrock Aug 16, 2024
6bf6ade
chore(ci): adding in image api
bassrock Aug 16, 2024
16b1f9a
chore(ci): adding in instant sync events
bassrock Aug 16, 2024
8192530
chore(ci): adding in parser wrapper
bassrock Aug 16, 2024
0a21a04
chore(ci): adding in pocket event bridge
bassrock Aug 16, 2024
da5d867
chore(ci): adding in push server
bassrock Aug 16, 2024
fe4be51
chore(ci): adding in sendgrid data
bassrock Aug 16, 2024
06b4aaf
chore(ci): adding in shareable lists api
bassrock Aug 16, 2024
957a695
chore(ci): adding in shared snowplow consumer
bassrock Aug 16, 2024
54f5357
chore(ci): adding in shares api
bassrock Aug 16, 2024
6975b80
chore(ci): adding in shares api
bassrock Aug 16, 2024
3ec9990
chore(ci): adding in v3 proxy api
bassrock Aug 16, 2024
0a7bbbf
chore(ci): adding in user-list search
bassrock Aug 16, 2024
a89e66a
fix(path): updating terraform path
bassrock Aug 16, 2024
542e39d
fix(sentry): move to docker secrets
bassrock Aug 16, 2024
e796ab8
fix(shell): updating to remove docker warnings
bassrock Aug 16, 2024
f0dbd23
fix(ci): updating ci bugs
bassrock Aug 19, 2024
6b70958
fix(scope): adding client api scope
bassrock Aug 19, 2024
407c260
Merge branch 'main' of github.com:Pocket/pocket-monorepo into github-…
bassrock Aug 19, 2024
a71d77d
fix(ci): adding in a paramaterized download for archive
bassrock Aug 20, 2024
be9fa9e
fix(prod): adding in production roles
bassrock Aug 20, 2024
61cd110
Merge branch 'main' of github.com:Pocket/pocket-monorepo into github-…
bassrock Aug 20, 2024
4b676c1
fix(main): moving branch ref to main
bassrock Aug 21, 2024
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
Prev Previous commit
Next Next commit
Merge branch 'main' of github.com:Pocket/pocket-monorepo into github-…
…actions
bassrock committed Aug 20, 2024
commit 61cd1108a5a487816ada39e9bad50b9a0f273222
2 changes: 1 addition & 1 deletion .github/actions/build-lambda/action.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ runs:
using: 'composite'
steps:
- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions
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,
6 changes: 2 additions & 4 deletions .github/actions/cdktf/action.yml
Original file line number Diff line number Diff line change
@@ -47,11 +47,8 @@ runs:
restore-keys: |
${{ runner.os }}-tfenv-

# TODO: These need to request AWS credentials to run terraform
# It may be best to not do AWS credentials here and do it in the calling workflow.. TBD

- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions
with:
scope: ${{ inputs['scope'] }}

@@ -86,6 +83,7 @@ runs:
env:
TERRAFORM_TOKEN: ${{ inputs.pagerduty-token }}
GITHUB_TOKEN: ${{ inputs.github-token }}
PAGERDUTY_TOKEN: ${{ inputs.pagerduty-token }}
run: |
cd ${{ inputs.stack-output-path }}
if [ "${{ inputs.behavior }}" = "apply" ]; then
1 change: 1 addition & 0 deletions .github/actions/raw-terraform/action.yml
Original file line number Diff line number Diff line change
@@ -84,6 +84,7 @@ runs:
env:
TERRAFORM_TOKEN: ${{ inputs.pagerduty-token }}
GITHUB_TOKEN: ${{ inputs.github-token }}
PAGERDUTY_TOKEN: ${{ inputs.pagerduty-token }}
run: |
cd ${{ inputs.stack-output-path }}
if [ "${{ inputs.behavior }}" = "apply" ]; then
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
fetch-depth: 2

- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions

- name: Semantic Release
run: pnpm run semantic-release
6 changes: 3 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v4

- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions

- name: Check for mismatched dependencies
run: pnpm run list-mismatches
@@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v4

- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions

- name: Lint code
run: pnpm run lint
@@ -36,7 +36,7 @@ jobs:
uses: actions/checkout@v4

- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions

- name: Unit tests
# Following uses a 2 concurrency because terraform modules seems to fail with an OOM error on CI if we do more.
2 changes: 1 addition & 1 deletion .github/workflows/reuse-apollo-federation.yml
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ jobs:
fetch-depth: 0
- name: Install pnpm & node
if: ${{ inputs.scope != '' }}
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions
with:
scope: ${{ inputs['scope'] }}
- name: Build schema
10 changes: 5 additions & 5 deletions .github/workflows/reuse-build-and-push-image.yml
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ jobs:
with:
name: ${{inputs.archive-download-name}}
- name: Build Docker Image
uses: ./.github/actions/containerize
uses: pocket/pocket-monorepo/.github/actions/containerize@github-actions
with:
docker-repo-name: "${{inputs.development-aws-registry }}/${{ format(inputs.docker-repo-name-pattern, 'dev') }}"
app-path: ${{inputs.app-path}}
@@ -109,7 +109,7 @@ jobs:
role-to-assume: arn:aws:iam::410318598490:role/PocketGHARole
- name: Build and Push Development Docker Image
id: dev-docker-build
uses: ./.github/actions/containerize
uses: pocket/pocket-monorepo/.github/actions/containerize@github-actions
with:
docker-repo-name: "${{inputs.development-aws-registry }}/${{ format(inputs.docker-repo-name-pattern, 'dev') }}"
app-path: ${{inputs.app-path}}
@@ -123,7 +123,7 @@ jobs:
scope: ${{inputs.scope}}
push: true
- name: Code Deploy Docker Image
uses: ./.github/actions/ecs-codedeploy
uses: pocket/pocket-monorepo/.github/actions/ecs-codedeploy@github-actions
if: fromJSON(inputs.terraform-output).ecs-task-containerName.value != ''
with:
docker-image-name: ${{steps.dev-docker-build.outputs.docker-image-name}}
@@ -149,7 +149,7 @@ jobs:
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Build and Push Production Docker Image
id: prod-docker-build
uses: ./.github/actions/containerize
uses: pocket/pocket-monorepo/.github/actions/containerize@github-actions
with:
docker-repo-name: "${{inputs.production-aws-registry }}/${{ format(inputs.docker-repo-name-pattern, 'prod') }}"
app-path: ${{inputs.app-path}}
@@ -163,7 +163,7 @@ jobs:
scope: ${{inputs.scope}}
push: true
- name: Code Deploy Docker Image
uses: ./.github/actions/ecs-codedeploy
uses: pocket/pocket-monorepo/.github/actions/ecs-codedeploy@github-actions
if: fromJSON(inputs.terraform-output).ecs-task-containerName.value != ''
with:
docker-image-name: ${{steps.prod-docker-build.outputs.docker-image-name}}
10 changes: 5 additions & 5 deletions .github/workflows/reuse-build-and-push-lambda.yml
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Build Lambda
uses: ./.github/actions/build-lambda
uses: pocket/pocket-monorepo/.github/actions/build-lambda@github-actions
with:
sentry-project: ${{inputs['sentry-project']}}
sentry-org: ${{inputs['sentry-org']}}
@@ -72,7 +72,7 @@ jobs:
aws-region: us-east-1
role-to-assume: arn:aws:iam::410318598490:role/PocketGHARole
- name: Build Lambda
uses: ./.github/actions/build-lambda
uses: pocket/pocket-monorepo/.github/actions/build-lambda@github-actions
with:
sentry-project: ${{inputs['sentry-project']}}
sentry-org: ${{inputs['sentry-org']}}
@@ -81,7 +81,7 @@ jobs:
s3-bucket: ${{ format(inputs.s3-bucket-pattern, 'dev') }}
s3-key: ${{ inputs.s3-key }}
- name: CodeDeploy Lambda
uses: ./.github/actions/lambda-codedeploy
uses: pocket/pocket-monorepo/.github/actions/lambda-codedeploy@github-actions
with:
s3-bucket: ${{ format(inputs.s3-bucket-pattern, 'dev') }}
s3-key: ${{ inputs.s3-key }}
@@ -101,7 +101,7 @@ jobs:
aws-region: us-east-1
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Build Lambda
uses: ./.github/actions/build-lambda
uses: pocket/pocket-monorepo/.github/actions/build-lambda@github-actions
with:
sentry-project: ${{inputs['sentry-project']}}
sentry-org: ${{inputs['sentry-org']}}
@@ -110,7 +110,7 @@ jobs:
s3-bucket: ${{ format(inputs.s3-bucket-pattern, 'prod') }}
s3-key: ${{ inputs.s3-key }}
- name: CodeDeploy Lambda
uses: ./.github/actions/lambda-codedeploy
uses: pocket/pocket-monorepo/.github/actions/lambda-codedeploy@github-actions
with:
s3-bucket: ${{ format(inputs.s3-bucket-pattern, 'prod') }}
s3-key: ${{ inputs.s3-key }}
16 changes: 8 additions & 8 deletions .github/workflows/reuse-infrastructure.yml
Original file line number Diff line number Diff line change
@@ -34,6 +34,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout Actions
uses: actions/checkout@v4
# Get the AWS credentials
- name: AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
@@ -42,11 +44,10 @@ jobs:
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Execute CDKTF
if: inputs.raw-terraform == false
uses: ./.github/actions/cdktf
uses: pocket/pocket-monorepo/.github/actions/cdktf@github-actions
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
# TODO: Change this to production when ready
environment: production
behavior: plan
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -55,11 +56,10 @@ jobs:

- name: Execute Raw Terraform
if: inputs.raw-terraform == true
uses: ./.github/actions/raw-terraform
uses: pocket/pocket-monorepo/.github/actions/raw-terraform@github-actions
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
# TODO: Change this to production when ready
environment: production
behavior: plan
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -88,7 +88,7 @@ jobs:
role-to-assume: arn:aws:iam::996905175585:role/PocketGHARole
- name: Execute Development CDKTF
if: inputs.raw-terraform == false && github.ref == 'refs/heads/dev'
uses: ./.github/actions/cdktf
uses: pocket/pocket-monorepo/.github/actions/cdktf@github-actions
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
@@ -99,7 +99,7 @@ jobs:
terraform-token: ${{ secrets.TERRAFORM_TOKEN }}
- name: Execute Developement Raw Terraform
if: inputs.raw-terraform == true && github.ref == 'refs/heads/dev'
uses: ./.github/actions/raw-terraform
uses: pocket/pocket-monorepo/.github/actions/raw-terraform@github-actions
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
@@ -111,7 +111,7 @@ jobs:

- name: Execute Production CDKTF
if: inputs.raw-terraform == false && github.ref == 'refs/heads/main'
uses: ./.github/actions/cdktf
uses: pocket/pocket-monorepo/.github/actions/cdktf@github-actions
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
@@ -123,7 +123,7 @@ jobs:

- name: Execute Production Raw Terraform
if: inputs.raw-terraform == true && github.ref == 'refs/heads/main'
uses: ./.github/actions/raw-terraform
uses: pocket/pocket-monorepo/.github/actions/raw-terraform@github-actions
with:
stack-output-path: ${{inputs['stack-output-path']}}
scope: ${{inputs['scope']}}
2 changes: 1 addition & 1 deletion .github/workflows/reuse-test-integrations.yml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ jobs:

# While we wait for docker compose to be healthy we install node and needed packages for this service
- name: Install pnpm & node
uses: ./.github/actions/install-pnpm-and-node
uses: pocket/pocket-monorepo/.github/actions/install-pnpm-and-node@github-actions
with:
scope: ${{ inputs['scope'] }}

25 changes: 1 addition & 24 deletions infrastructure/v3-proxy-api/src/main.ts
Original file line number Diff line number Diff line change
@@ -8,10 +8,6 @@ import {
} from '@cdktf/provider-aws';
import { provider as localProvider } from '@cdktf/provider-local';
import { provider as nullProvider } from '@cdktf/provider-null';
import {
provider as pagerdutyProvider,
dataPagerdutyEscalationPolicy,
} from '@cdktf/provider-pagerduty';
import {
PocketALBApplication,
PocketPagerDuty,
@@ -29,9 +25,6 @@ class Stack extends TerraformStack {
region: 'us-east-1',
defaultTags: [{ tags: config.tags }],
});
new pagerdutyProvider.PagerdutyProvider(this, 'pagerduty_provider', {
token: undefined,
});
new localProvider.LocalProvider(this, 'local_provider');
new nullProvider.NullProvider(this, 'null_provider');

@@ -87,23 +80,7 @@ class Stack extends TerraformStack {
return undefined;
}

const nonCriticalEscalationPolicyId =
new dataPagerdutyEscalationPolicy.DataPagerdutyEscalationPolicy(
this,
'non_critical_escalation_policy',
{
name: 'Pocket On-Call: Default Non-Critical - Tier 2+ (Former Backend Temporary Holder)',
},
).id;

return new PocketPagerDuty(this, 'pagerduty', {
prefix: config.prefix,
service: {
// This is a Tier 2 service and as such only raises non-critical alarms.
criticalEscalationPolicyId: nonCriticalEscalationPolicyId,
nonCriticalEscalationPolicyId: nonCriticalEscalationPolicyId,
},
});
return undefined;
}

/**
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.