Commit 8cc309c7 authored by Matt Wise's avatar Matt Wise
Browse files

Update cloud-providers/aws.yml

parent fe361543
Pipeline #31529 passed with stage
in 7 seconds
......@@ -117,26 +117,22 @@
aws_secret_access_key = $SECRET_ACCESS_KEY
EOF
aws-containerize-base:
extends:
- .aws
- .aws_base_variables
- .aws_variables
only:
variables:
- $AWS == 'true'
aws-containerize:
extends:
- .aws
- .aws_base_variables
- .aws_variables
- aws-containerize-base
- .aws_variables
stage: containerize
needs: ['compile-and-unit-test']
script:
- docker build -f $BUILD_DIR/Dockerfile -t $LOCAL_IMAGE_TAG .
- |
if [ -n $BUILDER_DOCKERFILE_PATH ] && [ -n $RUNTIME_DOCKERFILE_PATH ]; then
docker build -t builder:latest --file $BUILDER_DOCKERFILE_PATH .;
docker build -t $LOCAL_IMAGE_TAG --file $RUNTIME_DOCKERFILE_PATH --build-arg docker_builder_image=builder .;
else
docker build -f $BUILD_DIR/Dockerfile -t $LOCAL_IMAGE_TAG .;
fi
# Push to the local container registry
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $LOCAL_IMAGE_TAG
......@@ -148,39 +144,38 @@ aws-containerize:
- docker push $AWS_IMAGE_TAG_BASE:latest
only:
variables:
- $AWS == 'true' && $BUILDER_DOCKERFILE_PATH == null && $RUNTIME_DOCKERFILE_PATH == null
- $AWS == 'true'
aws-containerize-with-builder:
extends:
- .aws
- .aws_base_variables
- .aws_variables
- aws-containerize-base
stage: containerize
needs: ['compile-and-unit-test']
script:
- docker build -t builder:latest --file $BUILDER_DOCKERFILE_PATH .
- docker build -t $LOCAL_IMAGE_TAG --file $RUNTIME_DOCKERFILE_PATH --build-arg docker_builder_image=builder .
- docker build -f $BUILD_DIR/Dockerfile -t $LOCAL_IMAGE_TAG .
# Push to the local container registry
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $LOCAL_IMAGE_TAG
# Push to Amazon's container registry
- $(aws ecr get-login --no-include-email --region $AWS_ECR_REGION)
- docker tag $LOCAL_IMAGE_TAG $AWS_IMAGE_TAG_BASE:$CI_COMMIT_SHA
- docker tag $LOCAL_IMAGE_TAG $AWS_IMAGE_TAG_BASE:latest
- docker push $AWS_IMAGE_TAG_BASE:$CI_COMMIT_SHA
- docker push $AWS_IMAGE_TAG_BASE:latest
only:
variables:
- $AWS == 'true' && $BUILDER_DOCKERFILE_PATH != null && $RUNTIME_DOCKERFILE_PATH != null
# aws-containerize-with-builder:
# extends:
# - .aws
# - .aws_base_variables
# - .aws_variables
# - aws-containerize-base
# stage: containerize
# needs: ['compile-and-unit-test']
# script:
# docker_builder_image=builder .
# - docker build -f $BUILD_DIR/Dockerfile -t $LOCAL_IMAGE_TAG .
# # Push to the local container registry
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# - docker push $LOCAL_IMAGE_TAG
# # Push to Amazon's container registry
# - $(aws ecr get-login --no-include-email --region $AWS_ECR_REGION)
# - docker tag $LOCAL_IMAGE_TAG $AWS_IMAGE_TAG_BASE:$CI_COMMIT_SHA
# - docker tag $LOCAL_IMAGE_TAG $AWS_IMAGE_TAG_BASE:latest
# - docker push $AWS_IMAGE_TAG_BASE:$CI_COMMIT_SHA
# - docker push $AWS_IMAGE_TAG_BASE:latest
# only:
# variables:
# - $AWS == 'true' && $BUILDER_DOCKERFILE_PATH != null && $RUNTIME_DOCKERFILE_PATH != null
aws-update-ecs:
extends:
- .aws
- .aws_base_variables
- .aws_variables
stage: deploy
needs: ['aws-containerize-base']
needs: ['aws-containerize']
script:
- ECS_SERVICE_NAME=$(aws ssm get-parameter --name /osdu/${RESOURCE_PREFIX}/ecs/services/${SERVICE_NAME} --query Parameter.Value --output text --region $AWS_SANDBOX_REGION)
#limit output to the first 50 lines...the rest is bloat
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment