fix mongo download link for 4.2 4.4 explicitly

This commit is contained in:
Bastien Gerard
2021-03-03 11:40:39 +01:00
parent 0620ac5641
commit f244207168
5 changed files with 15 additions and 10 deletions

View File

@@ -13,8 +13,8 @@ on:
env:
MONGODB_3_6: 3.6.14
MONGODB_4_0: 4.0.23
MONGODB_4_2: 4.2.12
MONGODB_4_4: 4.4.4
MONGODB_4_2: 4.2
MONGODB_4_4: 4.4
PYMONGO_3_4: 3.4
PYMONGO_3_6: 3.6
@@ -52,7 +52,7 @@ jobs:
MONGODB: $MONGODB_3_6
PYMONGO: $PYMONGO_3_9
- python-version: 3.7
MONGODB: MONGODB_4_2
MONGODB: $MONGODB_4_2
PYMONGO: $PYMONGO_3_6
- python-version: 3.7
MONGODB: $MONGODB_4_4

View File

@@ -5,11 +5,14 @@ MONGODB=$1
# Mongo > 4.0 follows different name convention for download links
mongo_build=mongodb-linux-x86_64-${MONGODB}
if [[ "$MONGODB" == *"4."* ]] && [[ ! "$MONGODB" == *"4.0"* ]]; then
echo "It's there."
mongo_build=mongodb-linux-x86_64-ubuntu2004-v${MONGODB}-latest
if [[ "$MONGODB" == *"4.2"* ]]; then
mongo_build=mongodb-linux-x86_64-ubuntu1804-v${MONGODB}-latest
elif [[ "$MONGODB" == *"4.4"* ]]; then
mongo_build=mongodb-linux-x86_64-ubuntu1804-v${MONGODB}-latest
fi
wget http://fastdl.mongodb.org/linux/$mongo_build.tgz
tar xzf $mongo_build.tgz
${PWD}/$mongo_build/bin/mongod --version
mongodb_dir=$(find ${PWD}/ -type d -name "mongodb-linux-x86_64*")
$mongodb_dir/bin/mongod --version

View File

@@ -2,7 +2,8 @@
MONGODB=$1
mongodb_dir=${PWD}/mongodb-linux-x86_64-${MONGODB}
mongodb_dir=$(find ${PWD}/ -type d -name "mongodb-linux-x86_64*")
mkdir $mongodb_dir/data
$mongodb_dir/bin/mongod --dbpath $mongodb_dir/data --logpath $mongodb_dir/mongodb.log --fork
mongo --eval 'db.version();' # Make sure mongo is awake