Skip to content

Use Artifactory to obtain Docker images #1794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .evergreen/config_generator/components/earthly.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,15 @@ def earthly_task(
return EvgTask(
name=name,
commands=[
# Ensure subsequent Docker commands are authenticated.
subprocess_exec(
binary='bash',
command_type="setup",
args=[
"-c",
'docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"'
],
),
# First, just build the "env-warmup" which will prepare the build environment.
# This won't generate any output, but allows EVG to track it as a separate build step
# for timing and logging purposes. The subequent build step will cache-hit the
Expand All @@ -251,12 +260,9 @@ def earthly_task(


CONTAINER_RUN_DISTROS = [
"ubuntu2204-small",
"ubuntu2204-large",
"ubuntu2004-small",
"ubuntu2004",
"debian10",
"debian11",
"debian10-large",
"debian11-large",
"amazon2",
]

Expand All @@ -265,11 +271,11 @@ def tasks() -> Iterable[EvgTask]:
for conf in all_possible(Configuration):
# test-example is a target in all configurations
targets = ["test-example"]

# test-cxx-driver is only a target in configurations with specified mongocxx versions
if conf.test_mongocxx_ref != "none":
targets.append("test-cxx-driver")

task = earthly_task(
name=f"check:{conf.suffix}",
targets=targets,
Expand Down
133 changes: 83 additions & 50 deletions .evergreen/generated_configs/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1048,15 +1048,19 @@ tasks:
- func: check-headers
- name: "check:sasl=Cyrus\_\u2022\_tls=LibreSSL\_\u2022\_test_mongocxx_ref=r3.8.0"
run_on:
- ubuntu2204-small
- ubuntu2204-large
- ubuntu2004-small
- ubuntu2004
- debian10
- debian11
- debian10-large
- debian11-large
- amazon2
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]
commands:
- command: subprocess.exec
type: setup
params:
binary: bash
args:
- -c
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
- command: subprocess.exec
type: setup
params:
Expand Down Expand Up @@ -1084,15 +1088,19 @@ tasks:
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
- name: "check:sasl=Cyrus\_\u2022\_tls=LibreSSL\_\u2022\_test_mongocxx_ref=r3.9.0"
run_on:
- ubuntu2204-small
- ubuntu2204-large
- ubuntu2004-small
- ubuntu2004
- debian10
- debian11
- debian10-large
- debian11-large
- amazon2
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]
commands:
- command: subprocess.exec
type: setup
params:
binary: bash
args:
- -c
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
- command: subprocess.exec
type: setup
params:
Expand Down Expand Up @@ -1120,15 +1128,19 @@ tasks:
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
- name: "check:sasl=Cyrus\_\u2022\_tls=OpenSSL\_\u2022\_test_mongocxx_ref=none"
run_on:
- ubuntu2204-small
- ubuntu2204-large
- ubuntu2004-small
- ubuntu2004
- debian10
- debian11
- debian10-large
- debian11-large
- amazon2
tags: [earthly, pr-merge-gate, centos7-clang, centos7-gcc, u16-clang, u16-gcc]
commands:
- command: subprocess.exec
type: setup
params:
binary: bash
args:
- -c
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
- command: subprocess.exec
type: setup
params:
Expand Down Expand Up @@ -1156,15 +1168,19 @@ tasks:
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
- name: "check:sasl=Cyrus\_\u2022\_tls=OpenSSL\_\u2022\_test_mongocxx_ref=r3.8.0"
run_on:
- ubuntu2204-small
- ubuntu2204-large
- ubuntu2004-small
- ubuntu2004
- debian10
- debian11
- debian10-large
- debian11-large
- amazon2
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]
commands:
- command: subprocess.exec
type: setup
params:
binary: bash
args:
- -c
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
- command: subprocess.exec
type: setup
params:
Expand Down Expand Up @@ -1192,15 +1208,19 @@ tasks:
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
- name: "check:sasl=Cyrus\_\u2022\_tls=OpenSSL\_\u2022\_test_mongocxx_ref=r3.9.0"
run_on:
- ubuntu2204-small
- ubuntu2204-large
- ubuntu2004-small
- ubuntu2004
- debian10
- debian11
- debian10-large
- debian11-large
- amazon2
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]
commands:
- command: subprocess.exec
type: setup
params:
binary: bash
args:
- -c
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
- command: subprocess.exec
type: setup
params:
Expand Down Expand Up @@ -1228,15 +1248,19 @@ tasks:
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
- name: "check:sasl=Cyrus\_\u2022\_tls=off\_\u2022\_test_mongocxx_ref=none"
run_on:
- ubuntu2204-small
- ubuntu2204-large
- ubuntu2004-small
- ubuntu2004
- debian10
- debian11
- debian10-large
- debian11-large
- amazon2
tags: [earthly, pr-merge-gate, centos7-clang, centos7-gcc, u16-clang, u16-gcc]
commands:
- command: subprocess.exec
type: setup
params:
binary: bash
args:
- -c
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
- command: subprocess.exec
type: setup
params:
Expand Down Expand Up @@ -1264,15 +1288,19 @@ tasks:
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
- name: "check:sasl=Cyrus\_\u2022\_tls=off\_\u2022\_test_mongocxx_ref=r3.8.0"
run_on:
- ubuntu2204-small
- ubuntu2204-large
- ubuntu2004-small
- ubuntu2004
- debian10
- debian11
- debian10-large
- debian11-large
- amazon2
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]
commands:
- command: subprocess.exec
type: setup
params:
binary: bash
args:
- -c
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
- command: subprocess.exec
type: setup
params:
Expand Down Expand Up @@ -1300,15 +1328,19 @@ tasks:
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
- name: "check:sasl=Cyrus\_\u2022\_tls=off\_\u2022\_test_mongocxx_ref=r3.9.0"
run_on:
- ubuntu2204-small
- ubuntu2204-large
- ubuntu2004-small
- ubuntu2004
- debian10
- debian11
- debian10-large
- debian11-large
- amazon2
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]
commands:
- command: subprocess.exec
type: setup
params:
binary: bash
args:
- -c
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
- command: subprocess.exec
type: setup
params:
Expand Down Expand Up @@ -1336,15 +1368,19 @@ tasks:
- --c_compiler=${MONGOC_EARTHLY_C_COMPILER}
- name: "check:sasl=off\_\u2022\_tls=OpenSSL\_\u2022\_test_mongocxx_ref=r3.8.0"
run_on:
- ubuntu2204-small
- ubuntu2204-large
- ubuntu2004-small
- ubuntu2004
- debian10
- debian11
- debian10-large
- debian11-large
- amazon2
tags: [earthly, pr-merge-gate, u22-gcc]
commands:
- command: subprocess.exec
type: setup
params:
binary: bash
args:
- -c
- docker login -u "${artifactory_username}" --password-stdin artifactory.corp.mongodb.com <<<"${artifactory_password}"
- command: subprocess.exec
type: setup
params:
Expand Down Expand Up @@ -1376,12 +1412,9 @@ tasks:
- func: clang-format
- name: create-silk-asset-group
run_on:
- ubuntu2204-small
- ubuntu2204-large
- ubuntu2004-small
- ubuntu2004
- debian10
- debian11
- debian10-large
- debian11-large
- amazon2
tags: [misc, pr-merge-gate]
commands:
Expand Down
Loading