Skip to content

chore: clean up mise aws deploy tasks#168

Merged
scottgerring merged 1 commit into
mainfrom
chore/mise-aws-deploy
Jan 22, 2026
Merged

chore: clean up mise aws deploy tasks#168
scottgerring merged 1 commit into
mainfrom
chore/mise-aws-deploy

Conversation

@scottgerring

Copy link
Copy Markdown
Member

This PR makes mise aws:deploy:local work properly for individual services, not just at a stickerlandia-wide level. It also adds dependencies between the individual services and infrastructure (everything depends on infra, everything other than user-service depends on service-service), so that the requirements are automatically pulled in.

I've done this by introducing a distinction between DEPLOY_MODE and COMMIT_SHA. We use the former to choose to toggle on "local deploy" or "prebuilt release images" mode; if it is unset, we deploy using images tagged with the COMMIT_SHA.

If you set COMMIT_SHA to some actual hash and run a cdk deploy directly, you can deploy a particular version to AWS using the tagged GHCR images.

@jeastham1993

Copy link
Copy Markdown
Collaborator

@scottgerring is the explanation on the PR documented anywhere

@scottgerring scottgerring force-pushed the chore/mise-aws-deploy branch from 06bd735 to dbfa12c Compare January 22, 2026 13:49
@scottgerring

Copy link
Copy Markdown
Member Author

@scottgerring is the explanation on the PR documented anywhere
yep!

stickerlandia/mise.toml

Lines 145 to 162 in dbfa12c

# =============================================================================
# aws: AWS deployment tasks
#
# Deployment modes are controlled via the DEPLOY_MODE environment variable:
# - local: Build containers from local Dockerfiles (DEPLOY_MODE=local)
# - release: Pull prebuilt images from GHCR tagged "latest" (DEPLOY_MODE=release)
# - (unset): Falls back to COMMIT_SHA env var, or "latest" if not set
#
# DEPLOY_MODE is NOT stored in .env, so it propagates naturally through
# subprocess calls. CDK's SharedProps reads DEPLOY_MODE and sets the
# appropriate image tag. Services can define their own aws:deploy:local
# and aws:deploy:release tasks that set DEPLOY_MODE and delegate to aws:deploy.
#
# To deploy a specific tagged version from the registry (e.g., a CI-built
# image), set COMMIT_SHA to the desired tag and run aws:deploy directly
# without setting DEPLOY_MODE. For example:
# COMMIT_SHA=abc123 npx cdk deploy (from infra/aws directory)
# =============================================================================

@scottgerring scottgerring marked this pull request as ready for review January 22, 2026 14:06
@scottgerring scottgerring merged commit 7a8b903 into main Jan 22, 2026
26 checks passed
@scottgerring scottgerring deleted the chore/mise-aws-deploy branch January 22, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: add mise aws:deploy:local tasks explicitly to each sub-service

2 participants