My bitbucket pipeline is now failing on my docker build and push to AWS step. Nothing has been changed here and the pipeline just started breaking. The error I am getting is:
"no basic auth credentials"
Any idea what is causing this? Here is the code for the step:
- step:
name: Build Docker Image
services:
- docker
image: atlassian/pipelines-awscli
script:
- echo $(aws ecr get-login --no-include-email --region $DEFAULT_REGION) > login.sh
- sh login.sh
- docker build -f Dockerfile-stage -t $SERVICE_NAME --build-arg NPM_TOKEN=${NPM_TOKEN} .
- docker tag $SERVICE_NAME:latest $ECR_URL/$SERVICE_NAME:latest
- docker push $ECR_URL/$SERVICE_NAME:latest