Skip to content

Commit

Permalink
Move envs into $BASH_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-rumian authored Dec 18, 2020
1 parent 032d7ca commit 449dd3b
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,38 +111,33 @@ commands:
tag:
type: string
steps:
- run:
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
- run:
name: Build image
environment:
REGISTRY: public.ecr.aws/sumologic
TAG_URL: ${REGISTRY}/<< parameters.repo >>:<< parameters.tag >>
LATEST_URL: ${REGISTRY}/<< parameters.repo >>:latest
command: |
make docker-otelcontribcol
echo $REGISTRY
echo $TAG_URL
echo $LATEST_URL
docker tag otelcontribcol:latest ${TAG_URL}
docker tag otelcontribcol:latest ${LATEST_URL}
- 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 }}
REGISTRY: public.ecr.aws/sumologic
command: |
aws ecr get-login-password --region us-east-1
| docker login --username AWS --password-stdin ${REGISTRY}
- run:
name: Push image
environment:
REGISTRY: public.ecr.aws/sumologic
TAG_URL: ${REGISTRY}/<< parameters.repo >>:<< parameters.tag >>
LATEST_URL: ${REGISTRY}/<< parameters.repo >>:latest
command: |
docker push ${TAG_URL}
docker push ${LATEST_URL}
workflows:
version: 2
stability-tests:
Expand Down

0 comments on commit 449dd3b

Please sign in to comment.