Hey folks,
I’m struggling with some circle ci deployments. I keep getting an error when I run the following commands. I’ve tried using tick marks “`” as well to surround some of the nested commands but to no avail; same error.
It makes it to the second-to-last command and fails.
docker tag example/api:$CIRCLE_SHA1 $ECR/example/api:$CIRCLE_BRANCH
repository name component must match "[a-z0-9](?:-*[a-z0-9])*(?:[._][a-z0-9](?:-*[a-z0-9])*)*"
docker tag example/api:$CIRCLE_SHA1 $ECR/example/api:$CIRCLE_BRANCH returned exit code 1
Action failed: docker tag example/api:$CIRCLE_SHA1 $ECR/example/api:$CIRCLE_BRANCH
circle.yml
machine:
timezone:
America/Denver
ruby:
version: 2.3.1
services:
- redis
- docker
deployment:
hub:
branch: develop
commands:
- docker build --rm=false -t example/api:$CIRCLE_SHA1 . | cat # workaround progress weirdness
- DOCKER_LOGIN=$(aws ecr get-login --region us-west-2)
- echo $DOCKER_LOGIN
- $DOCKER_LOGIN
- ECR=$(echo $DOCKER_LOGIN | sed 's|.*https://||')
- echo "docker tag example/api:$CIRCLE_SHA1 $ECR/example/api:$CIRCLE_BRANCH"
- docker tag example/api:$CIRCLE_SHA1 $ECR/example/api:$CIRCLE_BRANCH
- docker push $ECR/example/api:$CIRCLE_BRANCH | cat # workaround progress weirdness