This commit is contained in:
Thanakarn Klangkasame
2025-09-30 11:01:02 +07:00
commit 92e614674c
182 changed files with 9596 additions and 0 deletions

26
buildspec.yml Normal file
View File

@@ -0,0 +1,26 @@
version: 0.2
env:
variables:
AWS_REGION: ap-southeast-7
ECR_REPO_URI: 804770683810.dkr.ecr.ap-southeast-7.amazonaws.com/amrez/eop-services
git-credential-helper: yes
phases:
pre_build:
commands:
- aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin $ECR_REPO_URI
- COMMIT_SHA=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c1-7)
- IMAGE_TAG=${COMMIT_SHA:-latest}
build:
commands:
- docker build -t $ECR_REPO_URI:$IMAGE_TAG -t $ECR_REPO_URI:latest .
post_build:
commands:
- docker push $ECR_REPO_URI:$IMAGE_TAG
- docker push $ECR_REPO_URI:latest
- printf '{"image":"%s","tag":"%s"}\n' "$ECR_REPO_URI" "$IMAGE_TAG" > image_detail.json
artifacts:
files:
- appspec.yml
- scripts/**/*
- image_detail.json