Skip to content

[SHIP-1981]: Use ECR images for ECS deployment#4

Merged
adriantaut merged 3 commits intomainfrom
feature/SHIP-1981-ecr-deployment
Jan 22, 2026
Merged

[SHIP-1981]: Use ECR images for ECS deployment#4
adriantaut merged 3 commits intomainfrom
feature/SHIP-1981-ecr-deployment

Conversation

@adriantaut
Copy link
Collaborator

Summary

  • Use EcrContainerImage from @zarpay/zar-cdk-lib to pull images from ECR
  • Update deploy.yml to build image and trigger infra deployment
  • Make infra-deploy.yml a reusable workflow (supports both workflow_call and workflow_dispatch)
  • Pass imageVersion via CDK context (--context imageVersion=<tag>)

Changes

  • service.ts: Use EcrContainerImage.fromContext() instead of hardcoded GHCR image
  • deploy.yml: Build + push image, then call infra-deploy.yml with image tag
  • infra-deploy.yml: Reusable workflow with required imageVersion input
  • infra-ci.yml: Pass dummy imageVersion for synth validation

Deployment Flow

Push to main → deploy.yml:
  1. Build job: builds image, tags as short SHA (e.g., abc1234)
  2. Deploy job: calls infra-deploy.yml with imageVersion=abc1234
       → CDK diff/deploy with --context imageVersion=abc1234
       → ECS pulls from ECR: 340458174631.dkr.ecr.me-central-1.amazonaws.com/fizzy:abc1234

Test plan

  • yarn build passes
  • CDK synth works with --context imageVersion=<tag>
  • Verify deploy workflow triggers infra-deploy correctly

🤖 Generated with Claude Code

adriantaut and others added 3 commits January 22, 2026 14:02
- Update service to use EcrContainerImage from zar-cdk-lib
- Update deploy.yml to build image and call infra-deploy workflow
- Update infra-deploy.yml as reusable workflow (workflow_call + workflow_dispatch)
- Update infra-ci.yml to pass imageVersion context for synth
- Hardcode ENVIRONMENT=production for workflows

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@adriantaut adriantaut merged commit 60cad56 into main Jan 22, 2026
4 checks passed
@adriantaut adriantaut deleted the feature/SHIP-1981-ecr-deployment branch January 22, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments