Skip to content

Commit

Permalink
update mongo/travis config
Browse files Browse the repository at this point in the history
Stolen from Alex's good work in #681
  • Loading branch information
ewollesen committed Nov 7, 2023
1 parent ed7a9a5 commit 914006e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@ go_import_path: github.com/tidepool-org/platform

env:
global:
- MONGODB=6.0.11
- MONGOSH=1.10.6
- MONGODB=7.0.2
- MONGOSH=2.0.2
- DIST=jammy

before_install:
- sudo apt-get remove -y mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
- wget -nv https://repo.mongodb.org/apt/ubuntu/dists/${DIST}/mongodb-org/6.0/multiverse/binary-amd64/mongodb-org-server_${MONGODB}_amd64.deb -O /tmp/mongodb.deb
- wget -nv https://downloads.mongodb.com/compass/mongodb-mongosh_${MONGOSH}_amd64.deb -O /tmp/mongosh.deb
- sudo apt install /tmp/mongodb.deb /tmp/mongosh.deb
- sudo apt update
- sudo apt install -y docker-buildx mongodb-org=${MONGODB} mongodb-org-database=${MONGODB} mongodb-org-server=${MONGODB} mongodb-mongosh=${MONGOSH} mongodb-org-mongos=${MONGODB} mongodb-org-tools=${MONGODB}
- mkdir /tmp/data
- /usr/bin/mongod --replSet rs0 --dbpath /tmp/data --bind_ip 127.0.0.1 --logpath ${PWD}/mongod.log &> /dev/null &
- until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done
- /usr/bin/mongosh --host 127.0.0.1 --port 27017 --eval 'rs.initiate(); while (rs.status().startupStatus || (rs.status().hasOwnProperty("myState") && rs.status().myState != 1)) { printjson( rs.status() ); sleep(1000); }; printjson( rs.status() );'

addons:
apt:
sources:
- sourceline: 'deb https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse'
key_url: 'https://pgp.mongodb.com/server-7.0.asc'
artifacts:
s3_region: us-west-2
paths:
Expand Down

0 comments on commit 914006e

Please sign in to comment.