File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ version : 0.2
2
+
3
+ phases :
4
+ pre_build :
5
+ commands :
6
+ - echo Logging in to Amazon ECR...
7
+ - aws --version
8
+ - REPOSITORY_URI=${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/${IMAGE_NAME}
9
+ - REGISTORY_URI=${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com
10
+ - aws ecr get-login-password | docker login --username AWS --password-stdin $REGISTORY_URI
11
+ - IMAGE_TAG=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7)
12
+ build :
13
+ commands :
14
+ - echo Build start `date`
15
+ - echo Build Docker
16
+ - docker build --build-arg APIKEY=${APIKEY} --build-arg AUTHDOMAIN=${AUTHDOMAIN} --build-arg DATABASEURL=${DATABASEURL} --build-arg PROJECTID=${PROJECTID} --build-arg STORAGEBUCKET=${STORAGEBUCKET} --build-arg MESSAGINGSENDERID=${MESSAGINGSENDERID} --build-arg APPID=${APPID} --build-arg MEASUREMENTID=G-N9EMMWHQJV -t $REPOSITORY_URI:latest .
17
+ - docker tag $REPOSITORY_URI:latest $REPOSITORY_URI:$IMAGE_TAG
18
+ post_build :
19
+ commands :
20
+ - echo Build complete `date`
21
+ - echo Push Docker
22
+ - docker push $REPOSITORY_URI:latest
23
+ - docker push $REPOSITORY_URI:$IMAGE_TAG
24
+ - echo Writing image definitions file...
25
+ - echo "[{\"name\":\"${IMAGE_NAME}\",\"imageUri\":\"${REPOSITORY_URI}:${IMAGE_TAG}\"}]" > imagedefinitions.json
26
+ artifacts :
27
+ files : imagedefinitions.json
You can’t perform that action at this time.
0 commit comments