Skip to content

Commit 7806964

Browse files
authored
ci: add dockerhub credentials to builds (#4)
1 parent 751b7fd commit 7806964

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.circleci/config.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ executors:
44
gradle_docker:
55
docker:
66
- image: cimg/openjdk:11.0
7+
auth:
8+
username: $DOCKERHUB_USERNAME
9+
password: $DOCKERHUB_PASSWORD
710

811
commands:
912
gradle:
@@ -33,6 +36,9 @@ commands:
3336
# fallback to using the latest cache if no exact match is found
3437
- v1-dependencies-
3538
- setup_remote_docker
39+
- run:
40+
name: Dockerhub login
41+
command: echo $DOCKERHUB_PASSWORD | docker login --username $DOCKERHUB_USERNAME --password-stdin
3642
save_populated_cache:
3743
description: "Save the gradle binary to the cache so it doesn't have to redownload"
3844
steps:
@@ -60,9 +66,13 @@ workflows:
6066
version: 2
6167
build-and-publish:
6268
jobs:
63-
- build
69+
- build:
70+
context:
71+
- dockerhub-read
6472
- publish:
65-
context: hypertrace-publishing
73+
context:
74+
- hypertrace-publishing
75+
- dockerhub-read
6676
requires:
6777
- build
6878
filters:

0 commit comments

Comments
 (0)