P5-7547 Fix ecr login and add tag (#42)
This commit is contained in:
@@ -239,10 +239,10 @@ Resources:
|
||||
TargetGroup:
|
||||
Type: AWS::ElasticLoadBalancingV2::TargetGroup
|
||||
Properties:
|
||||
HealthCheckIntervalSeconds: 10
|
||||
HealthCheckIntervalSeconds: 15
|
||||
# will look for a 200 status code by default unless specified otherwise
|
||||
HealthCheckPath: !Ref HealthCheckPath
|
||||
HealthCheckTimeoutSeconds: 5
|
||||
HealthCheckTimeoutSeconds: 10
|
||||
UnhealthyThresholdCount: 2
|
||||
HealthyThresholdCount: 2
|
||||
Name: !Join ["", [!Ref "AWS::StackName", TargetGroup]]
|
||||
@@ -433,7 +433,7 @@ Resources:
|
||||
post_build:
|
||||
commands:
|
||||
- echo Logging in to ECR to push image
|
||||
- $(aws ecr get-login --no-include-email --region eu-west-1)
|
||||
- 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
|
||||
- docker push "$IMAGE_URI"
|
||||
- docker push "$IMAGE_LATEST_URI"
|
||||
- printf '[{"name":"%s","imageUri":"%s"}]' "$IMAGE_NAME" "$IMAGE_LATEST_URI" > images.json
|
||||
@@ -447,6 +447,8 @@ Resources:
|
||||
EnvironmentVariables:
|
||||
- Name: AWS_DEFAULT_REGION
|
||||
Value: !Ref AWS::Region
|
||||
- Name: AWS_ACCOUNT_ID
|
||||
Value: !Ref AWS::AccountId
|
||||
- Name: REPOSITORY_URI
|
||||
Value: !Ref Image
|
||||
- Name: IMAGE_NAME
|
||||
|
||||
Reference in New Issue
Block a user