diff --git a/provider/indexer-aws/build-aws/buildspec.yaml b/provider/indexer-aws/build-aws/buildspec.yaml index fb477f3c39eeac97271a57d50f2712855d9df6fc..36ee74d85c323d76f9f71c39d13ea77b6b7e5416 100644 --- a/provider/indexer-aws/build-aws/buildspec.yaml +++ b/provider/indexer-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: @@ -62,6 +67,9 @@ phases: - echo "Building integration testing assemblies and gathering artifacts..." - ./testing/indexer-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/indexer-aws/build-aws/Dockerfile -t ${ECR_IMAGE} . - docker tag ${ECR_IMAGE} ${ECR_IMAGE_BRANCH_LATEST}