Skip to content

Commit

Permalink
AWS CLI orb
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-rumian committed Dec 21, 2020
1 parent 449dd3b commit 9acd5eb
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ parameters:

orbs:
win: circleci/[email protected]
aws-cli: circleci/[email protected]

executors:
golang:
Expand Down Expand Up @@ -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: |
Expand Down

0 comments on commit 9acd5eb

Please sign in to comment.