File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -7,23 +7,20 @@ phases:
7
7
- aws --version
8
8
- REPOSITORY_URI=${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/${IMAGE_NAME}
9
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)
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
12
build :
13
13
commands :
14
14
- echo Build start `date`
15
15
- echo Build Docker
16
- - echo ${REPOSITORY_URI}
17
- - echo ${IMAGE_NAME}
18
- - echo ${DATABASEURL}
19
- - 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_URL:latest .
20
- - docker tag $REPOSITORY_URI:latest $REPOSITORY_URI:$IMAGE_TAG
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=${MEASUREMENTID} -t ${REPOSITORY_URL}:latest .
17
+ - docker tag ${REPOSITORY_URI}:latest ${REPOSITORY_URI}:${IMAGE_TAG}
21
18
post_build :
22
19
commands :
23
20
- echo Build complete `date`
24
21
- echo Push Docker
25
- - docker push $REPOSITORY_URI:latest
26
- - docker push $REPOSITORY_URI:$ IMAGE_TAG
22
+ - docker push ${ REPOSITORY_URI} :latest
23
+ - docker push ${ REPOSITORY_URI}:${ IMAGE_TAG}
27
24
- echo Writing image definitions file...
28
25
- echo "[{\"name\":\"${IMAGE_NAME}\",\"imageUri\":\"${REPOSITORY_URI}:${IMAGE_TAG}\"}]" > imagedefinitions.json
29
26
artifacts :
You can’t perform that action at this time.
0 commit comments