From bd805df013bfc4f365e7d9b5a8ab79fc95b0f933 Mon Sep 17 00:00:00 2001 From: Ravi Singal Date: Wed, 28 Oct 2020 18:42:51 +0530 Subject: [PATCH] ci: add dockerhub credentials to builds --- .circleci/config.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 948cfe4..1b130b9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,6 +4,9 @@ executors: gradle_docker: docker: - image: cimg/openjdk:11.0 + auth: + username: $DOCKERHUB_USERNAME + password: $DOCKERHUB_PASSWORD commands: gradle: @@ -33,6 +36,9 @@ commands: # fallback to using the latest cache if no exact match is found - v1-dependencies- - setup_remote_docker + - run: + name: Dockerhub login + command: echo $DOCKERHUB_PASSWORD | docker login --username $DOCKERHUB_USERNAME --password-stdin save_populated_cache: description: "Save the gradle binary to the cache so it doesn't have to redownload" steps: @@ -60,9 +66,13 @@ workflows: version: 2 build-and-publish: jobs: - - build + - build: + context: + - dockerhub-read - publish: - context: hypertrace-publishing + context: + - hypertrace-publishing + - dockerhub-read requires: - build filters: