From 9acd5ebce430eda51eb42746d6646f7e94266d99 Mon Sep 17 00:00:00 2001 From: Mateusz Rumian Date: Mon, 21 Dec 2020 09:55:41 +0100 Subject: [PATCH] AWS CLI orb --- .circleci/config.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1033506307f0..d4d52579ff7e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,6 +13,7 @@ parameters: orbs: win: circleci/windows@2.4.0 + aws-cli: circleci/aws-cli@1.3.1 executors: golang: @@ -115,22 +116,18 @@ commands: name: Setup Environment Variables command: | echo "export REGISTRY=public.ecr.aws/sumologic" >> $BASH_ENV - echo "export TAG_URL=${REGISTRY}/<< parameters.repo >>:<< parameters.tag >>" >> $BASH_ENV - echo "export LATEST_URL${REGISTRY}/<< parameters.repo >>:latest" >> $BASH_ENV + echo "export TAG_URL=public.ecr.aws/sumologic/<< parameters.repo >>:<< parameters.tag >>" >> $BASH_ENV + echo "export LATEST_URL=public.ecr.aws/sumologic/<< parameters.repo >>:latest" >> $BASH_ENV - run: name: Build image command: | make docker-otelcontribcol docker tag otelcontribcol:latest ${TAG_URL} docker tag otelcontribcol:latest ${LATEST_URL} + - aws-cli/install - run: name: Login to AWS ECR - environment: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_PUBLIC_ECR_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_PUBLIC_ECR_SECRET_ACCESS_KEY }} - command: | - aws ecr get-login-password --region us-east-1 - | docker login --username AWS --password-stdin ${REGISTRY} + command: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${REGISTRY} - run: name: Push image command: |