diff --git a/provider/legal-aws/build-aws/buildspec.yaml b/provider/legal-aws/build-aws/buildspec.yaml index a247ac98de5e32ae7322bc4c89a534a8ac017d32..01ed13973390da3d5474bc1774ea8af5d7ec2117 100644 --- a/provider/legal-aws/build-aws/buildspec.yaml +++ b/provider/legal-aws/build-aws/buildspec.yaml @@ -17,6 +17,11 @@ # https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html version: 0.2 +env: + secrets-manager: + DOCKER_USERNAME: /osdu/devops/docker_credentials:username + DOCKER_PASSWORD: /osdu/devops/docker_credentials:password + phases: install: runtime-versions: @@ -63,6 +68,9 @@ phases: - echo "Building integration testing assemblies and gathering artifacts..." - ./testing/legal-test-aws/build-aws/prepare-dist.sh + - echo "Logging into Docker Hub..." + - docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD} + - echo "Building docker image..." - docker build -f provider/legal-aws/build-aws/Dockerfile -t ${ECR_IMAGE} . - docker tag ${ECR_IMAGE} ${ECR_IMAGE_BRANCH_LATEST}