Skip to content

Commit 9c0a2f5

Browse files
authored
Use Artifactory to obtain Docker images (#1794)
1 parent 4ccd9db commit 9c0a2f5

File tree

4 files changed

+111
-72
lines changed

4 files changed

+111
-72
lines changed

.evergreen/config_generator/components/earthly.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,15 @@ def earthly_task(
228228
return EvgTask(
229229
name=name,
230230
commands=[
231+
# Ensure subsequent Docker commands are authenticated.
232+
subprocess_exec(
233+
binary='bash',
234+
command_type="setup",
235+
args=[
236+
"-c",
237+
'docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"'
238+
],
239+
),
231240
# First, just build the "env-warmup" which will prepare the build environment.
232241
# This won't generate any output, but allows EVG to track it as a separate build step
233242
# for timing and logging purposes. The subequent build step will cache-hit the
@@ -251,12 +260,9 @@ def earthly_task(
251260

252261

253262
CONTAINER_RUN_DISTROS = [
254-
"ubuntu2204-small",
255263
"ubuntu2204-large",
256-
"ubuntu2004-small",
257-
"ubuntu2004",
258-
"debian10",
259-
"debian11",
264+
"debian10-large",
265+
"debian11-large",
260266
"amazon2",
261267
]
262268

@@ -265,11 +271,11 @@ def tasks() -> Iterable[EvgTask]:
265271
for conf in all_possible(Configuration):
266272
# test-example is a target in all configurations
267273
targets = ["test-example"]
268-
274+
269275
# test-cxx-driver is only a target in configurations with specified mongocxx versions
270276
if conf.test_mongocxx_ref != "none":
271277
targets.append("test-cxx-driver")
272-
278+
273279
task = earthly_task(
274280
name=f"check:{conf.suffix}",
275281
targets=targets,

.evergreen/generated_configs/tasks.yml

Lines changed: 83 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,15 +1048,19 @@ tasks:
10481048
- func: check-headers
10491049
- name: "check:sasl=Cyrus\_\u2022\_tls=LibreSSL\_\u2022\_test_mongocxx_ref=r3.8.0"
10501050
run_on:
1051-
- ubuntu2204-small
10521051
- ubuntu2204-large
1053-
- ubuntu2004-small
1054-
- ubuntu2004
1055-
- debian10
1056-
- debian11
1052+
- debian10-large
1053+
- debian11-large
10571054
- amazon2
10581055
tags: [earthly, pr-merge-gate, alpine3.16-clang, alpine3.16-gcc, alpine3.17-clang, alpine3.17-gcc, alpine3.18-clang, alpine3.18-gcc, alpine3.19-clang, alpine3.19-gcc, archlinux-clang, archlinux-gcc]
10591056
commands:
1057+
- command: subprocess.exec
1058+
type: setup
1059+
params:
1060+
binary: bash
1061+
args:
1062+
- -c
1063+
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
10601064
- command: subprocess.exec
10611065
type: setup
10621066
params:
@@ -1084,15 +1088,19 @@ tasks:
10841088
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
10851089
- name: "check:sasl=Cyrus\_\u2022\_tls=LibreSSL\_\u2022\_test_mongocxx_ref=r3.9.0"
10861090
run_on:
1087-
- ubuntu2204-small
10881091
- ubuntu2204-large
1089-
- ubuntu2004-small
1090-
- ubuntu2004
1091-
- debian10
1092-
- debian11
1092+
- debian10-large
1093+
- debian11-large
10931094
- amazon2
10941095
tags: [earthly, pr-merge-gate, alpine3.16-clang, alpine3.16-gcc, alpine3.17-clang, alpine3.17-gcc, alpine3.18-clang, alpine3.18-gcc, alpine3.19-clang, alpine3.19-gcc, archlinux-clang, archlinux-gcc]
10951096
commands:
1097+
- command: subprocess.exec
1098+
type: setup
1099+
params:
1100+
binary: bash
1101+
args:
1102+
- -c
1103+
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
10961104
- command: subprocess.exec
10971105
type: setup
10981106
params:
@@ -1120,15 +1128,19 @@ tasks:
11201128
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
11211129
- name: "check:sasl=Cyrus\_\u2022\_tls=OpenSSL\_\u2022\_test_mongocxx_ref=none"
11221130
run_on:
1123-
- ubuntu2204-small
11241131
- ubuntu2204-large
1125-
- ubuntu2004-small
1126-
- ubuntu2004
1127-
- debian10
1128-
- debian11
1132+
- debian10-large
1133+
- debian11-large
11291134
- amazon2
11301135
tags: [earthly, pr-merge-gate, centos7-clang, centos7-gcc, u16-clang, u16-gcc]
11311136
commands:
1137+
- command: subprocess.exec
1138+
type: setup
1139+
params:
1140+
binary: bash
1141+
args:
1142+
- -c
1143+
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
11321144
- command: subprocess.exec
11331145
type: setup
11341146
params:
@@ -1156,15 +1168,19 @@ tasks:
11561168
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
11571169
- name: "check:sasl=Cyrus\_\u2022\_tls=OpenSSL\_\u2022\_test_mongocxx_ref=r3.8.0"
11581170
run_on:
1159-
- ubuntu2204-small
11601171
- ubuntu2204-large
1161-
- ubuntu2004-small
1162-
- ubuntu2004
1163-
- debian10
1164-
- debian11
1172+
- debian10-large
1173+
- debian11-large
11651174
- amazon2
11661175
tags: [earthly, pr-merge-gate, alpine3.16-clang, alpine3.16-gcc, alpine3.17-clang, alpine3.17-gcc, alpine3.18-clang, alpine3.18-gcc, alpine3.19-clang, alpine3.19-gcc, archlinux-clang, archlinux-gcc, u18-clang, u20-clang, u20-gcc, u22-clang, u22-gcc]
11671176
commands:
1177+
- command: subprocess.exec
1178+
type: setup
1179+
params:
1180+
binary: bash
1181+
args:
1182+
- -c
1183+
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
11681184
- command: subprocess.exec
11691185
type: setup
11701186
params:
@@ -1192,15 +1208,19 @@ tasks:
11921208
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
11931209
- name: "check:sasl=Cyrus\_\u2022\_tls=OpenSSL\_\u2022\_test_mongocxx_ref=r3.9.0"
11941210
run_on:
1195-
- ubuntu2204-small
11961211
- ubuntu2204-large
1197-
- ubuntu2004-small
1198-
- ubuntu2004
1199-
- debian10
1200-
- debian11
1212+
- debian10-large
1213+
- debian11-large
12011214
- amazon2
12021215
tags: [earthly, pr-merge-gate, alpine3.16-clang, alpine3.16-gcc, alpine3.17-clang, alpine3.17-gcc, alpine3.18-clang, alpine3.18-gcc, alpine3.19-clang, alpine3.19-gcc, archlinux-clang, archlinux-gcc, u18-clang, u18-gcc, u20-clang, u20-gcc, u22-clang, u22-gcc]
12031216
commands:
1217+
- command: subprocess.exec
1218+
type: setup
1219+
params:
1220+
binary: bash
1221+
args:
1222+
- -c
1223+
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
12041224
- command: subprocess.exec
12051225
type: setup
12061226
params:
@@ -1228,15 +1248,19 @@ tasks:
12281248
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
12291249
- name: "check:sasl=Cyrus\_\u2022\_tls=off\_\u2022\_test_mongocxx_ref=none"
12301250
run_on:
1231-
- ubuntu2204-small
12321251
- ubuntu2204-large
1233-
- ubuntu2004-small
1234-
- ubuntu2004
1235-
- debian10
1236-
- debian11
1252+
- debian10-large
1253+
- debian11-large
12371254
- amazon2
12381255
tags: [earthly, pr-merge-gate, centos7-clang, centos7-gcc, u16-clang, u16-gcc]
12391256
commands:
1257+
- command: subprocess.exec
1258+
type: setup
1259+
params:
1260+
binary: bash
1261+
args:
1262+
- -c
1263+
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
12401264
- command: subprocess.exec
12411265
type: setup
12421266
params:
@@ -1264,15 +1288,19 @@ tasks:
12641288
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
12651289
- name: "check:sasl=Cyrus\_\u2022\_tls=off\_\u2022\_test_mongocxx_ref=r3.8.0"
12661290
run_on:
1267-
- ubuntu2204-small
12681291
- ubuntu2204-large
1269-
- ubuntu2004-small
1270-
- ubuntu2004
1271-
- debian10
1272-
- debian11
1292+
- debian10-large
1293+
- debian11-large
12731294
- amazon2
12741295
tags: [earthly, pr-merge-gate, alpine3.16-clang, alpine3.16-gcc, alpine3.17-clang, alpine3.17-gcc, alpine3.18-clang, alpine3.18-gcc, alpine3.19-clang, alpine3.19-gcc, archlinux-clang, archlinux-gcc, u18-clang, u20-clang, u20-gcc, u22-clang, u22-gcc]
12751296
commands:
1297+
- command: subprocess.exec
1298+
type: setup
1299+
params:
1300+
binary: bash
1301+
args:
1302+
- -c
1303+
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
12761304
- command: subprocess.exec
12771305
type: setup
12781306
params:
@@ -1300,15 +1328,19 @@ tasks:
13001328
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
13011329
- name: "check:sasl=Cyrus\_\u2022\_tls=off\_\u2022\_test_mongocxx_ref=r3.9.0"
13021330
run_on:
1303-
- ubuntu2204-small
13041331
- ubuntu2204-large
1305-
- ubuntu2004-small
1306-
- ubuntu2004
1307-
- debian10
1308-
- debian11
1332+
- debian10-large
1333+
- debian11-large
13091334
- amazon2
13101335
tags: [earthly, pr-merge-gate, alpine3.16-clang, alpine3.16-gcc, alpine3.17-clang, alpine3.17-gcc, alpine3.18-clang, alpine3.18-gcc, alpine3.19-clang, alpine3.19-gcc, archlinux-clang, archlinux-gcc, u18-clang, u18-gcc, u20-clang, u20-gcc, u22-clang, u22-gcc]
13111336
commands:
1337+
- command: subprocess.exec
1338+
type: setup
1339+
params:
1340+
binary: bash
1341+
args:
1342+
- -c
1343+
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
13121344
- command: subprocess.exec
13131345
type: setup
13141346
params:
@@ -1336,15 +1368,19 @@ tasks:
13361368
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
13371369
- name: "check:sasl=off\_\u2022\_tls=OpenSSL\_\u2022\_test_mongocxx_ref=r3.8.0"
13381370
run_on:
1339-
- ubuntu2204-small
13401371
- ubuntu2204-large
1341-
- ubuntu2004-small
1342-
- ubuntu2004
1343-
- debian10
1344-
- debian11
1372+
- debian10-large
1373+
- debian11-large
13451374
- amazon2
13461375
tags: [earthly, pr-merge-gate, u22-gcc]
13471376
commands:
1377+
- command: subprocess.exec
1378+
type: setup
1379+
params:
1380+
binary: bash
1381+
args:
1382+
- -c
1383+
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
13481384
- command: subprocess.exec
13491385
type: setup
13501386
params:
@@ -1376,12 +1412,9 @@ tasks:
13761412
- func: clang-format
13771413
- name: create-silk-asset-group
13781414
run_on:
1379-
- ubuntu2204-small
13801415
- ubuntu2204-large
1381-
- ubuntu2004-small
1382-
- ubuntu2004
1383-
- debian10
1384-
- debian11
1416+
- debian10-large
1417+
- debian11-large
13851418
- amazon2
13861419
tags: [misc, pr-merge-gate]
13871420
commands:

0 commit comments

Comments
 (0)