File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ DOCKER_HUB_URL=" https://index.docker.io/v1/"
6+
7+ STDIN=$( cat)
8+
9+ ACTION=" $1 "
10+
11+ case " $ACTION " in
12+ get)
13+ SERVER_URL=" $STDIN "
14+
15+ if [[ " $SERVER_URL " == " $DOCKER_HUB_URL " ]]; then
16+ if [[ -z " ${DOCKERHUB_USERNAME:- } " || -z " ${DOCKERHUB_PASSWORD:- } " ]]; then
17+ echo " Error: DOCKERHUB_USERNAME or DOCKERHUB_PASSWORD environment variables are not set." >&2
18+ exit 1
19+ fi
20+
21+ echo " {\" Username\" : \" $DOCKERHUB_USERNAME \" , \" Secret\" : \" $DOCKERHUB_PASSWORD \" }"
22+ else
23+ echo " Error: No credentials available for $SERVER_URL " >&2
24+ exit 1
25+ fi
26+ ;;
27+
28+ * )
29+ echo " Unsupported action: $ACTION " >&2
30+ exit 1
31+ ;;
32+ esac
Original file line number Diff line number Diff line change 1+ {
2+ "auths" : {
3+ "https://index.docker.io/v1/" : {}
4+ },
5+ "credsStore" : " from-env"
6+ }
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ function printCompassEnv() {
7474 pathsToPrepend . unshift ( '/opt/mongodbtoolchain/v4/bin' ) ;
7575 }
7676
77+ pathsToPrepend ( `${ originalPWD } /.evergreen/docker-config/bin` ) ;
78+
7779 PATH = maybePrependPaths ( PATH , pathsToPrepend ) ;
7880 printVar ( 'PATH' , PATH ) ;
7981
@@ -113,6 +115,8 @@ function printCompassEnv() {
113115
114116 // https://jira.mongodb.org/browse/NODE-6320
115117 printVar ( 'GYP_DEFINES' , `kerberos_use_rtld=${ process . platform === 'linux' } ` ) ;
118+
119+ printVar ( 'DOCKER_CONFIG' , `${ originalPWD } /.evergreen/docker-config` ) ;
116120}
117121
118122printCompassEnv ( ) ;
You can’t perform that action at this time.
0 commit comments