config.yml
version: 2.1
orbs:
aws-ecr: circleci/aws-ecr@8.1.2
jobs:
build:
machine:
image: ubuntu-2204:2022.04.2
steps:
- checkout
- run: |
echo "$DOCKER_PASS" | aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 12345678910.dkr.ecr.us-east-1.amazonaws.com
workflows:
build_and_push_image:
jobs:
- aws-ecr/build-and-push-image: # Use the pre-defined `build-and-push-image` job
dockerfile: Dockerfile
path: .
profile-name: default
aws-cli-version: latest
repo: upbe
region: ${AWS_REGION}
registry-id: AWS_ECR_REGISTRY_ID
tag: tag1 # default - latest
env variable:
ACCESS_KEY_ID
AWS_DEFAULT_REGION
AWS_ECR_ACCOUNT_URL
AWS_ECR_REGISTRY_ID
AWS_REGION
REGISTRY_ID
SECRET_ACCESS_KEY