Skip to content

Commit eb9507d

Browse files
committed
also log out of docker
1 parent 9dd7547 commit eb9507d

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ cleanup() {
8585
fi
8686
echo "Deleting Atlas db user \`$ATLAS_TEST_DB_USERNAME\`..."
8787
atlascli dbusers delete $ATLAS_TEST_DB_USERNAME --force
88+
89+
if [ -n "$DOCKERHUB_PASSWORD" ]; then
90+
echo "Logging out of docker"
91+
docker logout
92+
fi
8893
}
8994

9095
trap cleanup EXIT

.evergreen/start-atlas-local.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ cleanup() {
1515
echo "Stopping and removing container..."
1616
docker stop $CONTAINER_NAME || true
1717
docker rm -f $CONTAINER_NAME || true
18+
19+
if [ -n "$DOCKERHUB_PASSWORD" ]; then
20+
echo "Logging out of docker"
21+
docker logout
22+
fi
1823
}
1924

2025
trap cleanup EXIT

.evergreen/start-docker-envs.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ if [ "$HAS_DOCKER" = true ]; then
7878
$DOCKER_COMPOSE -f test-envs/docker/ssh/docker-compose.yaml down -v --remove-orphans
7979
$DOCKER_COMPOSE -f test-envs/docker/tls/docker-compose.yaml down -v --remove-orphans
8080
$DOCKER_COMPOSE -f test-envs/docker/kerberos/docker-compose.yaml down -v --remove-orphans
81+
82+
if [ -n "$DOCKERHUB_PASSWORD" ]; then
83+
echo "Logging out of docker"
84+
docker logout
85+
fi
8186
}
8287

8388
trap "__stop_all_docker_containers" EXIT

0 commit comments

Comments
 (0)