You've already forked microservices
mirror of
https://github.com/ebosas/microservices.git
synced 2025-08-24 20:08:55 +02:00
Test pipeline [BuildServer]
This commit is contained in:
@@ -3,15 +3,13 @@ phases:
|
|||||||
pre_build:
|
pre_build:
|
||||||
commands:
|
commands:
|
||||||
- aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com
|
- aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com
|
||||||
# - TAG=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | head -c 8)
|
- COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | head -c 8)
|
||||||
- TAG=latest
|
- TAG=${COMMIT_HASH:=latest}
|
||||||
- IMAGE_URI=$REPO_URI:$TAG
|
|
||||||
build:
|
build:
|
||||||
commands:
|
commands:
|
||||||
- docker build -t $IMAGE_URI -f $SERVICE.Dockerfile .
|
- docker build -t $REPO_URI:latest -f $SERVICE.Dockerfile .
|
||||||
|
- docker tag $REPO_URI:latest $REPO_URI:$TAG
|
||||||
post_build:
|
post_build:
|
||||||
commands:
|
commands:
|
||||||
- docker push $IMAGE_URI
|
- docker push $REPO_URI:latest
|
||||||
- printf '{"ImageUri":"%s"}' $IMAGE_URI > build.json
|
- docker push $REPO_URI:$TAG
|
||||||
artifacts:
|
|
||||||
files: build.json
|
|
Reference in New Issue
Block a user