Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
a4cda78
chore: ecr infra
chrispsheehan Mar 31, 2026
fd1e727
chore: ecr module
chrispsheehan Mar 31, 2026
4d42b20
chore: cluster infra
chrispsheehan Mar 31, 2026
d58f1b5
chore: ecs-get-directories
chrispsheehan Mar 31, 2026
38829ec
chore: ecs cluster infra
chrispsheehan Mar 31, 2026
8cde0e7
chore: add get ecs dirs
chrispsheehan Mar 31, 2026
47f377d
chore: pr ecs build check
chrispsheehan Mar 31, 2026
a60963e
chore: fix destroy job
chrispsheehan Mar 31, 2026
8fb452b
chore: pass in ecs matrix
chrispsheehan Mar 31, 2026
48b7137
chore: docker push to ecr
chrispsheehan Mar 31, 2026
533581c
chore: pass in version inputs + reorder
chrispsheehan Apr 2, 2026
4ef9a2e
chore: error if bucket/ecr is null
chrispsheehan Apr 2, 2026
2f59fb3
debug: comment out dev deploy
chrispsheehan Apr 2, 2026
d206d24
debug: comment out correct thing
chrispsheehan Apr 2, 2026
02dd8bf
fix: try fail on null output
chrispsheehan Apr 2, 2026
b6c2d57
chore: frontend version
chrispsheehan Apr 2, 2026
57e8123
debug: push on this branch
chrispsheehan Apr 2, 2026
c014616
debug: build_get2
chrispsheehan Apr 2, 2026
77da8e0
fix: non-hard coded env for build
chrispsheehan Apr 2, 2026
25b1ee3
debug: null output test
chrispsheehan Apr 2, 2026
52090bf
fix: add auth in docker-push
chrispsheehan Apr 2, 2026
a5fc780
chore: better get ecr error
chrispsheehan Apr 2, 2026
781bf77
debug: check failure
chrispsheehan Apr 2, 2026
eba258c
chore: do that same for bucket check
chrispsheehan Apr 2, 2026
575bed1
chore: rn images instead of ecs job
chrispsheehan Apr 2, 2026
e8611e2
chore: dev force delete ecr
chrispsheehan Apr 2, 2026
6c2a8c0
debug: add back in deploy
chrispsheehan Apr 2, 2026
7d335aa
feat: shared svc module
chrispsheehan Apr 2, 2026
20ce8b9
chore: rm trigger for branch
chrispsheehan Apr 2, 2026
29d33b3
feat: task shared module
chrispsheehan Apr 2, 2026
749a167
chore: worker svc and task
chrispsheehan Apr 2, 2026
ee7c369
fix: fixes found by codex
chrispsheehan Apr 2, 2026
8a01e4b
feat: api vpc link from codex
chrispsheehan Apr 2, 2026
07805c1
chore: create one service module
chrispsheehan Apr 2, 2026
976a7e2
fix: force_delete=true
chrispsheehan Apr 7, 2026
e0e511d
chore: rename ecs to containers
chrispsheehan Apr 7, 2026
6cea623
fix: fmt
chrispsheehan Apr 7, 2026
96bceaf
fix: rm ecs_matrix from deploy invoke
chrispsheehan Apr 7, 2026
2884bb9
feat: otel collector container
chrispsheehan Apr 7, 2026
aebba5f
chore: shared dockerfile
chrispsheehan Apr 8, 2026
1949c26
debug: try dev build
chrispsheehan Apr 8, 2026
995839c
fix: aws_oidc_role_arn
chrispsheehan Apr 8, 2026
5f1b9a3
debug: rm commented ci code
chrispsheehan Apr 8, 2026
f77ab4a
debug: rm commented out
chrispsheehan Apr 8, 2026
6e801fd
chore: concat all deploy just actions
chrispsheehan Apr 8, 2026
9dc9050
fix: set vpc name
chrispsheehan Apr 8, 2026
fc00129
fix: fmt
chrispsheehan Apr 8, 2026
6b871b3
fix: KEEP: ${{ inputs.lambda_keep }}
chrispsheehan Apr 8, 2026
10f26cb
chore: separate service-get-directories script
chrispsheehan Apr 8, 2026
2107ad5
chore: check task/ecs pairs
chrispsheehan Apr 8, 2026
f597643
debug: test
chrispsheehan Apr 8, 2026
a79da31
debug: test
chrispsheehan Apr 8, 2026
c736160
debug: rm test
chrispsheehan Apr 8, 2026
7536cdf
chore: output lambda versions
chrispsheehan Apr 8, 2026
d0500f8
chore: deploy this branch
chrispsheehan Apr 8, 2026
19ded54
fix: ci yamls
chrispsheehan Apr 8, 2026
29f139b
fix: rm dev ci VERSION
chrispsheehan Apr 8, 2026
d1522fb
chore: add dir scripts
chrispsheehan Apr 8, 2026
172b7ce
feat: bootstrapped task
chrispsheehan Apr 9, 2026
a838af4
fix: rn bootstrap container
chrispsheehan Apr 9, 2026
5af4d68
feat: deploy ecs with no image
chrispsheehan Apr 9, 2026
eddff2b
fix: service_matrix input
chrispsheehan Apr 9, 2026
860c3ad
feat: network module
chrispsheehan Apr 9, 2026
79b79ec
feat: separate security module
chrispsheehan Apr 9, 2026
a3ec19b
fix: name limit issue
chrispsheehan Apr 9, 2026
38b957b
fix: oidc + elasticloadbalancing:*
chrispsheehan Apr 9, 2026
9079178
fix: task_worker state
chrispsheehan Apr 9, 2026
2929d5d
fix: interface endpoints for ecr
chrispsheehan Apr 9, 2026
dbc0521
fix: bootstrap task arn
chrispsheehan Apr 9, 2026
ae4bd99
fix: add s3 gateway endpoint
chrispsheehan Apr 9, 2026
ff39bbe
fix: destroy order in ci
chrispsheehan Apr 9, 2026
3b5a98f
debug: rm trigger
chrispsheehan Apr 9, 2026
475cf3d
chore: rn lambda_worker
chrispsheehan Apr 9, 2026
45e3868
chore: mv general modules to _shared dir
chrispsheehan Apr 9, 2026
f65b98d
chore: move security group to module
chrispsheehan Apr 9, 2026
5aaee86
feat: deploy tasks + delete
chrispsheehan Apr 9, 2026
f78a2ca
chore: deployment strategy added to service
chrispsheehan Apr 10, 2026
833f2d6
chore: rolling deploy default
chrispsheehan Apr 10, 2026
03b5af8
chore: generate tasks in deploy.yml
chrispsheehan Apr 10, 2026
47c111e
feat: run code deploy in deploy.yml
chrispsheehan Apr 10, 2026
96c7c97
chore: rename
chrispsheehan Apr 10, 2026
1bd9f7b
docs: notes on required networking
chrispsheehan Apr 10, 2026
51b916a
fix: pas in name of tasks without prefix
chrispsheehan Apr 10, 2026
4bd916b
debug: deploy this branch
chrispsheehan Apr 10, 2026
d848b7b
fix: ci dep for security module
chrispsheehan Apr 10, 2026
e4b2345
chore: mv api to the network module
chrispsheehan Apr 10, 2026
c436386
chore: lambdas need network
chrispsheehan Apr 10, 2026
2e61e34
docs: add readmes
chrispsheehan Apr 10, 2026
d2999fd
fix: destroy fix
chrispsheehan Apr 10, 2026
8e66da0
agent: fail when bad logic
chrispsheehan Apr 10, 2026
c1de666
fix: destroy yaml deps
chrispsheehan Apr 10, 2026
fb4b641
agents: add ci checks
chrispsheehan Apr 10, 2026
2cd4787
fix: rm lambda to ecs dep
chrispsheehan Apr 10, 2026
3114636
fix: add destroy uris
chrispsheehan Apr 10, 2026
f1135ab
debug: cm out trigger
chrispsheehan Apr 10, 2026
1b841a9
fix: handle non codedeploy svc
chrispsheehan Apr 10, 2026
6191728
debug: re-add trigger
chrispsheehan Apr 10, 2026
be11870
fix: dev deploy inputs
chrispsheehan Apr 10, 2026
fd61b0c
fix: ignore bootstrap
chrispsheehan Apr 10, 2026
f88414b
fix: get ecr name from image
chrispsheehan Apr 10, 2026
29c7541
fix: deploy bugs
chrispsheehan Apr 10, 2026
1a60cdb
docs: infra root
chrispsheehan Apr 10, 2026
f1b7a8c
fix: pass in ecr repo name
chrispsheehan Apr 10, 2026
45327f9
doc: start/stop of shared vars
chrispsheehan Apr 10, 2026
4dc9213
chore: shared get_directories yml
chrispsheehan Apr 10, 2026
5e7a93d
agents: dry instruction
chrispsheehan Apr 10, 2026
4309346
fix: rm dep for frontend in destroy
chrispsheehan Apr 10, 2026
cbef521
fix: use root ecr name var
chrispsheehan Apr 10, 2026
4cfaf9b
chore: ignore task definition arn changes
chrispsheehan Apr 10, 2026
e976eb0
debug: rm trigger
chrispsheehan Apr 10, 2026
8a0e1f8
fix: changes to allow blue/green
chrispsheehan Apr 10, 2026
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
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.git
.github
.claude
venv
dist
frontend/node_modules
frontend/dist
node_modules
.DS_Store
121 changes: 105 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,41 @@ on:
required: true
type: string
frontend_version:
required: false
required: true
type: string
ecs_version:
required: true
type: string
default: ""
lambda_matrix:
required: false
type: string
default: "[]"
ecs_matrix:
required: false
type: string
default: "[]"
outputs:
code_bucket:
description: "Bucket containing build artifacts"
value: ${{ jobs.bucket.outputs.code_bucket_name }}
lambda_version:
description: "Resolved lambda version"
value: ${{ inputs.lambda_version }}
frontend_version:
description: "Resolved frontend version"
value: ${{ inputs.frontend_version }}
ecs_version:
description: "Resolved ECS version"
value: ${{ inputs.ecs_version }}
repository_url:
description: "ECR repository url"
value: ${{ jobs.ecr.outputs.repository_url }}
ecs_image_uris:
description: "List of full ECS image URIs built by this workflow"
value: ${{ jobs.containers.outputs.ecs_image_uris }}
lambda_s3_keys:
description: "List of lambda S3 object keys built by this workflow"
value: ${{ jobs.lambdas.outputs.lambda_s3_keys }}

concurrency: # only run one instance of workflow at any one time
group: build-${{ inputs.environment }}
Expand Down Expand Up @@ -57,36 +85,84 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Build frontend
uses: chrispsheehan/just-aws-oidc-action@0.3.0
with:
just_action: frontend-build

- name: Upload frontend
uses: chrispsheehan/just-aws-oidc-action@0.3.0
env:
BUCKET_NAME: ${{ needs.bucket.outputs.code_bucket_name }}
VERSION: ${{ inputs.frontend_version != '' && inputs.frontend_version || inputs.lambda_version }}
VERSION: ${{ inputs.frontend_version }}
with:
aws_oidc_role_arn: ${{ env.AWS_OIDC_ROLE_ARN }}
just_action: frontend-upload
just_action: frontend-build frontend-upload

lambdas:
needs: bucket
ecr:
runs-on: ubuntu-latest
outputs:
repository_url: ${{ steps.get_repository_url.outputs.repository_url }}
steps:
- uses: actions/checkout@v6

- name: Get ECR infra
id: get-ecr
uses: chrispsheehan/terragrunt-aws-oidc-action@0.4.1
with:
aws_oidc_role_arn: ${{ env.AWS_OIDC_ROLE_ARN }}
tg_directory: infra/live/${{ inputs.environment }}/aws/ecr
tg_action: init

- name: Get ECR repository url
id: get_repository_url
env:
TG_OUTPUTS: ${{ steps.get-ecr.outputs.tg_outputs }}
run: |
echo "repository_url=$(echo $TG_OUTPUTS | jq -r '.repository_url.value')" >> $GITHUB_OUTPUT

containers:
needs: ecr
runs-on: ubuntu-latest
outputs:
ecs_image_uris: ${{ steps.image_uris.outputs.ecs_image_uris }}
strategy:
fail-fast: true
matrix:
value: ${{ fromJson(inputs.lambda_matrix) }}
value: ${{ fromJson(inputs.ecs_matrix) }}
steps:
- uses: actions/checkout@v6

- name: "Build ${{ matrix.value }} Lambda"
- name: "Build ${{ matrix.value }} ECS image"
uses: chrispsheehan/just-aws-oidc-action@0.3.0
env:
LAMBDA_NAME: ${{ matrix.value }}
CONTAINER_NAME: ${{ matrix.value }}
IMAGE_URI: ${{ needs.ecr.outputs.repository_url }}:${{ matrix.value }}-${{ inputs.ecs_version }}
with:
just_action: lambda-build
aws_oidc_role_arn: ${{ env.AWS_OIDC_ROLE_ARN }}
just_action: docker-build docker-push

- name: Build ECS image URI list
if: ${{ matrix.value == fromJson(inputs.ecs_matrix)[0] }}
id: image_uris
shell: bash
env:
REPOSITORY_URL: ${{ needs.ecr.outputs.repository_url }}
ECS_VERSION: ${{ inputs.ecs_version }}
ECS_MATRIX: ${{ inputs.ecs_matrix }}
run: |
echo "ecs_image_uris=$(jq -cn \
--arg repo "$REPOSITORY_URL" \
--arg version "$ECS_VERSION" \
--argjson images "$ECS_MATRIX" \
'$images | map("\($repo):\(.)-\($version)")')" >> "$GITHUB_OUTPUT"

lambdas:
needs: bucket
runs-on: ubuntu-latest
outputs:
lambda_s3_keys: ${{ steps.lambda_s3_keys.outputs.lambda_s3_keys }}
strategy:
fail-fast: true
matrix:
value: ${{ fromJson(inputs.lambda_matrix) }}
steps:
- uses: actions/checkout@v6

- name: "Upload ${{ matrix.value }} Lambda"
uses: chrispsheehan/just-aws-oidc-action@0.3.0
Expand All @@ -96,4 +172,17 @@ jobs:
VERSION: ${{ inputs.lambda_version }}
with:
aws_oidc_role_arn: ${{ env.AWS_OIDC_ROLE_ARN }}
just_action: lambda-upload
just_action: lambda-build lambda-upload

- name: Build lambda S3 key list
if: ${{ matrix.value == fromJson(inputs.lambda_matrix)[0] }}
id: lambda_s3_keys
shell: bash
env:
LAMBDA_VERSION: ${{ inputs.lambda_version }}
LAMBDA_MATRIX: ${{ inputs.lambda_matrix }}
run: |
echo "lambda_s3_keys=$(jq -cn \
--arg version "$LAMBDA_VERSION" \
--argjson lambdas "$LAMBDA_MATRIX" \
'$lambdas | map("lambdas/\($version)/\(.).zip")')" >> "$GITHUB_OUTPUT"
132 changes: 124 additions & 8 deletions .github/workflows/build_get.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,34 @@ on:
frontend_version:
required: false
type: string
default: ""
ecs_version:
required: false
type: string
outputs:
code_bucket:
description: "Bucket containing build artifacts"
value: ${{ jobs.bucket.outputs.code_bucket_name }}
lambda_version:
description: "Valid lambda version"
description: "Resolved lambda version"
value: ${{ inputs.lambda_version }}
lambda_version_files:
description: "List of lambda version files"
value: ${{ jobs.lambdas.outputs.lambda_version_files }}
frontend_version:
description: "Valid frontend version"
description: "Resolved frontend version"
value: ${{ inputs.frontend_version != '' && inputs.frontend_version || inputs.lambda_version }}
ecs_version:
description: "Resolved ECS version"
value: ${{ inputs.ecs_version != '' && inputs.ecs_version || inputs.lambda_version }}
ecs_image_uris:
description: "List of full ECS image URIs"
value: ${{ jobs.images.outputs.ecs_image_uris }}
ecs_task_matrix:
description: "List of ECS service names for the version"
value: ${{ jobs.images.outputs.ecs_task_matrix }}
lambda_version_files:
description: "List of lambda names"
value: ${{ jobs.lambdas.outputs.lambda_version_files }}
lambda_s3_keys:
description: "List of lambda S3 object keys"
value: ${{ jobs.lambdas.outputs.lambda_s3_keys }}

concurrency: # only run one instance of workflow at any one time
group: ${{ github.workflow }}-${{ inputs.environment }}
Expand Down Expand Up @@ -59,7 +73,98 @@ jobs:
env:
TG_OUTPUTS: ${{ steps.code_action.outputs.tg_outputs }}
run: |
echo "bucket=$(echo $TG_OUTPUTS | jq -r '.bucket.value')" >> $GITHUB_OUTPUT
echo "🔍 Raw TG_OUTPUTS:"
echo "$TG_OUTPUTS" | jq .

bucket=$(echo "$TG_OUTPUTS" | jq -r '.bucket.value // empty')

if [ -z "$bucket" ] || [ "$bucket" = "null" ]; then
echo "::error title=Missing code bucket::Failed to extract '.bucket.value' from Terragrunt output for infra/live/${{ inputs.environment }}/aws/code_bucket"
echo "::error::Full TG_OUTPUTS:"
exit 1
fi

echo "bucket=$bucket" >> "$GITHUB_OUTPUT"

ecr:
runs-on: ubuntu-latest
outputs:
repository_url: ${{ steps.get_repository_url.outputs.repository_url }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.lambda_version }}

- name: Get ECR infra
id: get-ecr
uses: chrispsheehan/terragrunt-aws-oidc-action@0.4.1
with:
aws_oidc_role_arn: ${{ env.AWS_OIDC_ROLE_ARN }}
tg_directory: infra/live/${{ inputs.environment }}/aws/ecr
tg_action: init

- name: Get ECR repository url
id: get_repository_url
env:
TG_OUTPUTS: ${{ steps.get-ecr.outputs.tg_outputs }}
run: |
echo "🔍 Raw TG_OUTPUTS:"
echo "$TG_OUTPUTS" | jq .

repository_url=$(echo "$TG_OUTPUTS" | jq -r '.repository_url.value // empty')

if [ -z "$repository_url" ] || [ "$repository_url" = "null" ]; then
echo "::error title=Missing ECR repository URL::Failed to extract '.repository_url.value' from Terragrunt output for infra/live/${{ inputs.environment }}/aws/ecr"
echo "::error::Full TG_OUTPUTS:"
exit 1
fi

echo "repository_url=$repository_url" >> "$GITHUB_OUTPUT"

images:
needs: ecr
runs-on: ubuntu-latest
outputs:
ecs_image_uris: ${{ steps.image_uris.outputs.ecs_image_uris }}
ecs_task_matrix: ${{ steps.task_matrix.outputs.just_outputs }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.lambda_version }}

- name: Get ECR version images
id: get_version_images
uses: chrispsheehan/just-aws-oidc-action@0.3.0
env:
REPOSITORY_URL: ${{ needs.ecr.outputs.repository_url }}
VERSION: ${{ inputs.ecs_version != '' && inputs.ecs_version || inputs.lambda_version }}
with:
aws_oidc_role_arn: ${{ env.AWS_OIDC_ROLE_ARN }}
just_action: get-ecr-version-images

- name: Build full image URIs
id: image_uris
shell: bash
env:
REPOSITORY_URL: ${{ needs.ecr.outputs.repository_url }}
VERSION: ${{ inputs.ecs_version != '' && inputs.ecs_version || inputs.lambda_version }}
IMAGE_NAMES: ${{ steps.get_version_images.outputs.just_outputs }}
run: |
echo "ecs_image_uris=$(jq -cn \
--arg repo "$REPOSITORY_URL" \
--arg version "$VERSION" \
--argjson images "$IMAGE_NAMES" \
'$images | map("\($repo):\(.)-\($version)")')" >> "$GITHUB_OUTPUT"

- name: Build ECS task matrix
id: task_matrix
uses: chrispsheehan/just-aws-oidc-action@0.3.0
env:
REPOSITORY_URL: ${{ needs.ecr.outputs.repository_url }}
VERSION: ${{ inputs.ecs_version != '' && inputs.ecs_version || inputs.lambda_version }}
with:
aws_oidc_role_arn: ${{ env.AWS_OIDC_ROLE_ARN }}
just_action: get-ecr-version-tasks

frontend:
needs: bucket
Expand All @@ -83,6 +188,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
lambda_version_files: ${{ steps.get_build_files.outputs.just_outputs }}
lambda_s3_keys: ${{ steps.get_build_file_keys.outputs.just_outputs }}

steps:
- uses: actions/checkout@v6
Expand All @@ -98,7 +204,7 @@ jobs:
aws_oidc_role_arn: ${{ env.AWS_OIDC_ROLE_ARN }}
just_action: lambda-check-version

- name: Get build files
- name: Get lambda names
id: get_build_files
uses: chrispsheehan/just-aws-oidc-action@0.3.0
env:
Expand All @@ -107,3 +213,13 @@ jobs:
with:
aws_oidc_role_arn: ${{ env.AWS_OIDC_ROLE_ARN }}
just_action: get-version-files

- name: Get lambda S3 keys
id: get_build_file_keys
uses: chrispsheehan/just-aws-oidc-action@0.3.0
env:
BUCKET_NAME: ${{ needs.bucket.outputs.code_bucket_name }}
VERSION: ${{ inputs.lambda_version }}
with:
aws_oidc_role_arn: ${{ env.AWS_OIDC_ROLE_ARN }}
just_action: get-version-file-keys
Loading
Loading