Skip to content

Commit ef5afb3

Browse files
committed
chore: add support for MongoDB 8
1 parent 9828d5c commit ef5afb3

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

.github/workflows/ci-test-e2e.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626
transporter:
2727
type: string
2828
mongodb-version:
29-
default: "['5.0', '7.0']"
29+
default: "['5.0', '8.2']"
3030
required: false
3131
type: string
3232
release:
@@ -77,16 +77,16 @@ jobs:
7777
test:
7878
runs-on: ubuntu-24.04
7979
env:
80-
RC_DOCKERFILE: ${{ inputs.rc-dockerfile }}.${{ (matrix.mongodb-version == '7.0' && 'debian' && false) || 'alpine' }}
81-
RC_DOCKER_TAG: ${{ inputs.rc-docker-tag }}.${{ (matrix.mongodb-version == '7.0' && 'debian' && false) || 'alpine' }}
80+
RC_DOCKERFILE: ${{ inputs.rc-dockerfile }}.${{ (matrix.mongodb-version == '8.2' && 'debian' && false) || 'alpine' }}
81+
RC_DOCKER_TAG: ${{ inputs.rc-docker-tag }}.${{ (matrix.mongodb-version == '8.2' && 'debian' && false) || 'alpine' }}
8282

8383
strategy:
8484
fail-fast: false
8585
matrix:
8686
mongodb-version: ${{ fromJSON(inputs.mongodb-version) }}
8787
shard: ${{ fromJSON(inputs.shard) }}
8888

89-
name: MongoDB ${{ matrix.mongodb-version }}${{ inputs.db-watcher-disabled == 'false' && ' [legacy watchers]' || '' }} (${{ matrix.shard }}/${{ inputs.total-shard }}) - ${{ (matrix.mongodb-version == '7.0' && 'Debian' && false) || 'Alpine (Official)' }}
89+
name: MongoDB ${{ matrix.mongodb-version }}${{ inputs.db-watcher-disabled == 'false' && ' [legacy watchers]' || '' }} (${{ matrix.shard }}/${{ inputs.total-shard }}) - ${{ (matrix.mongodb-version == '8.2' && 'Debian' && false) || 'Alpine (Official)' }}
9090

9191
steps:
9292
- name: Collect Workflow Telemetry

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
fi;
131131
132132
curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \
133-
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"denoVersion\": \"${{ needs.release-versions.outputs.deno-version }}\", \"compatibleMongoVersions\": [\"5.0\", \"6.0\", \"7.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"draft\", \"draftAs\": \"$RC_RELEASE\"}" \
133+
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"denoVersion\": \"${{ needs.release-versions.outputs.deno-version }}\", \"compatibleMongoVersions\": [\"5\", \"6\", \"7\", \"8\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"draft\", \"draftAs\": \"$RC_RELEASE\"}" \
134134
https://releases.rocket.chat/update
135135
136136
packages-build:
@@ -468,7 +468,7 @@ jobs:
468468
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
469469
shard: '[1, 2, 3, 4, 5]'
470470
total-shard: 5
471-
mongodb-version: "['7.0']"
471+
mongodb-version: "['8.2']"
472472
node-version: ${{ needs.release-versions.outputs.node-version }}
473473
deno-version: ${{ needs.release-versions.outputs.deno-version }}
474474
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
@@ -818,7 +818,7 @@ jobs:
818818
fi;
819819
820820
curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \
821-
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"denoVersion\": \"${{ needs.release-versions.outputs.deno-version }}\", \"compatibleMongoVersions\": [\"5.0\", \"6.0\", \"7.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"$RC_RELEASE\"}" \
821+
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"denoVersion\": \"${{ needs.release-versions.outputs.deno-version }}\", \"compatibleMongoVersions\": [\"5\", \"6\", \"7\", \"8\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"$RC_RELEASE\"}" \
822822
https://releases.rocket.chat/update
823823
824824
# Makes build fail if the release isn't there

docker-compose-local.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,26 @@ services:
146146
- nats
147147

148148
mongo:
149-
image: docker.io/bitnamilegacy/mongodb:7.0.1
149+
image: mongodb/mongodb-community-server:8.2-ubuntu2204
150150
restart: on-failure
151151
ports:
152152
- 27017:27017
153153
environment:
154-
MONGODB_REPLICA_SET_MODE: primary
155154
MONGODB_REPLICA_SET_NAME: ${MONGODB_REPLICA_SET_NAME:-rs0}
156155
MONGODB_PORT_NUMBER: ${MONGODB_PORT_NUMBER:-27017}
157156
MONGODB_INITIAL_PRIMARY_HOST: ${MONGODB_INITIAL_PRIMARY_HOST:-mongo}
158-
MONGODB_INITIAL_PRIMARY_PORT_NUMBER: ${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}
159-
MONGODB_ADVERTISED_HOSTNAME: ${MONGODB_ADVERTISED_HOSTNAME:-mongo}
160-
MONGODB_ENABLE_JOURNAL: ${MONGODB_ENABLE_JOURNAL:-true}
161-
ALLOW_EMPTY_PASSWORD: ${ALLOW_EMPTY_PASSWORD:-yes}
157+
entrypoint: |
158+
bash -c
159+
"mongod --replSet $$MONGODB_REPLICA_SET_NAME --bind_ip_all &
160+
sleep 2;
161+
until mongosh --eval \"db.adminCommand('ping')\"; do
162+
echo '=====> Waiting for Mongo...';
163+
sleep 1;
164+
done;
165+
echo \"=====> Initiating ReplSet $$MONGODB_REPLICA_SET_NAME at $$MONGODB_INITIAL_PRIMARY_HOST:$$MONGODB_PORT_NUMBER...\";
166+
mongosh --eval \"rs.initiate({_id: '$$MONGODB_REPLICA_SET_NAME', members: [{ _id: 0, host: '$$MONGODB_INITIAL_PRIMARY_HOST:$$MONGODB_PORT_NUMBER' }]})\";
167+
echo '=====> Initiating ReplSet done...';
168+
wait"
162169
163170
nats:
164171
image: nats:2.6-alpine

0 commit comments

Comments
 (0)