Skip to content

Instantly share code, notes, and snippets.

@Anishmourya
Last active April 8, 2020 12:27
Show Gist options
  • Save Anishmourya/da75fc273f4f4696699fda2a1ce011d4 to your computer and use it in GitHub Desktop.
Save Anishmourya/da75fc273f4f4696699fda2a1ce011d4 to your computer and use it in GitHub Desktop.
AWS ECS: Deploy Docker Container from Bitbucket Pipeline to AWS ECR
image: atlassian/default-image:2
definitions:
steps:
- step: &BuildAndPushVersion
name: Build Image Push to ECR
services:
- docker
script:
- docker build -t ${BITBUCKET_REPO_SLUG} .
- pipe: atlassian/aws-ecr-push-image:1.1.1
variables:
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION}
IMAGE_NAME: ${BITBUCKET_REPO_SLUG}
TAGS: $BITBUCKET_BRANCH
pipelines:
branches:
development:
- step: *BuildAndPushVersion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment