Skip to content

Commit e0857d2

Browse files
committed
Use artifactory mirror as docker registry
1 parent 117c32f commit e0857d2

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

.evergreen/functions.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,11 +600,15 @@ functions:
600600
COMPASS_E2E_TEST_GROUPS: ${e2e_test_groups}
601601
COMPASS_E2E_TEST_GROUP: ${e2e_test_group}
602602
ATLAS_LOCAL_VERSION: latest
603+
DOCKER_REGISTRY: artifactory.corp.mongodb.com
603604
script: |
604605
set -e
605606
# Load environment variables
606607
eval $(.evergreen/print-compass-env.sh)
607608
609+
# Authenticate with the Artifactory docker registry
610+
echo "${ARTIFACTORY_PASSWORD}" | docker login "${DOCKER_REGISTRY}" --username "${ARTIFACTORY_USERNAME}" --password-stdin
611+
608612
# Start atlas local to test Atlas Search
609613
source .evergreen/start-atlas-local.sh
610614
@@ -690,14 +694,22 @@ functions:
690694
MCLI_ORG_ID: ${e2e_tests_mcli_org_id}
691695
MCLI_PROJECT_ID: ${e2e_tests_mcli_project_id}
692696
MCLI_OPS_MANAGER_URL: ${e2e_tests_mcli_ops_manager_url}
697+
DOCKER_REGISTRY: artifactory.corp.mongodb.com
693698
script: |
694699
set -e
700+
695701
# Load environment variables
696702
eval $(.evergreen/print-compass-env.sh)
703+
704+
# Authenticate with the Artifactory docker registry
705+
echo "${ARTIFACTORY_PASSWORD}" | docker login "${DOCKER_REGISTRY}" --username "${ARTIFACTORY_USERNAME}" --password-stdin
706+
697707
# Create Atlas cluster for test project
698708
source .evergreen/start-atlas-cloud-cluster.sh
709+
699710
# Run the tests
700711
echo "Starting e2e tests..."
712+
701713
# We're only running a special subset of tests as provisioning atlas
702714
# clusters in CI is both pricey and flakey, so we want to limit the
703715
# coverage to reduce those factors (at least for now)

.evergreen/start-atlas-cloud-cluster.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,16 @@ ATLAS_CLUSTER_NAME="${_ATLAS_CLOUD_TEST_CLUSTER_NAME:-$DEFAULT_ATLAS_CLOUD_TEST_
6161
ATLAS_TEST_DB_USERNAME="testuser-$RUN_ID"
6262
ATLAS_TEST_DB_PASSWORD="$(head -c 32 /dev/urandom | base64 | tr -dc 'a-zA-Z0-9')"
6363

64+
DOCKER_REGISTRY="${DOCKER_REGISTRY-registry.hub.docker.com}"
65+
6466
function atlascli() {
6567
docker run \
6668
-e MCLI_PUBLIC_API_KEY \
6769
-e MCLI_PRIVATE_API_KEY \
6870
-e MCLI_ORG_ID \
6971
-e MCLI_PROJECT_ID \
7072
-e MCLI_OPS_MANAGER_URL \
71-
mongodb/atlas atlas $@
73+
$DOCKER_REGISTRY/library/mongodb/atlas atlas $@
7274
}
7375

7476
cleanup() {

.evergreen/start-atlas-local.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ cleanup() {
2020
trap cleanup EXIT
2121

2222
# Image name with version
23-
IMAGE_NAME="mongodb/mongodb-atlas-local:$ATLAS_LOCAL_VERSION"
24-
echo docker run --rm --name $CONTAINER_NAME -d -e DO_NOT_TRACK=1 -P "$IMAGE_NAME"
23+
DOCKER_REGISTRY="${DOCKER_REGISTRY-registry.hub.docker.com}"
24+
DOCKER_IMAGE="$DOCKER_REGISTRY/library/mongodb/mongodb-atlas-local:$ATLAS_LOCAL_VERSION"
25+
echo docker run --rm --name $CONTAINER_NAME -d -e DO_NOT_TRACK=1 -P "$DOCKER_IMAGE"
2526

2627
# Start the Docker container
27-
docker run --rm --name $CONTAINER_NAME -d -e DO_NOT_TRACK=1 -P "$IMAGE_NAME"
28+
docker run --rm --name $CONTAINER_NAME -d -e DO_NOT_TRACK=1 -P "$DOCKER_IMAGE"
2829

2930
echo "Waiting for container to become healthy..."
3031

0 commit comments

Comments
 (0)