Complyra release automation is image-tag based and manifest-driven.
./scripts/aws/03_build_and_push.sh uses the following tag strategy:
- Explicit tag argument if provided
- Git short SHA if available
- UTC timestamp fallback
Each release writes metadata to releases/<tag>.json.
- Build and push release images:
cd /Users/liweiguang/aiagent/complyra
./scripts/aws/03_build_and_push.sh <release_tag>Before deployment, run IaC policy checks:
cd /Users/liweiguang/aiagent/complyra
./scripts/iac/01_conftest_check.sh- Register task definitions from release metadata:
./scripts/aws/08_register_taskdefs_from_release.sh <release_tag>- Deploy ECS services by release:
./scripts/aws/09_deploy_services_from_release.sh <cluster_name> <release_tag>A release manifest contains:
release_tagcreated_at_utcregionaccount_idapi_imageweb_image
This metadata is used as rollback source of truth.
- Pick a known-good release tag from
releases/. - Run:
cd /Users/liweiguang/aiagent/complyra
./scripts/aws/06_prepare_rollback.sh <release_tag>- Update ECS task definitions to the release images.
- Force ECS service deployments.
- Run smoke tests using
./scripts/aws/05_smoke_test.sh.
Use this when CodeDeploy ECS blue/green is configured:
cd /Users/liweiguang/aiagent/complyra
./scripts/aws/10_trigger_codedeploy_ecs.sh <codedeploy_app_name> <deployment_group_name> <task_definition_arn>- Use immutable tags in production, never
latest. - Keep at least the last 10 release manifests for quick rollback.
- Store release manifests in source control if your release process allows it.