Skip to content

Commit afaa2c5

Browse files
committed
install versioned pips and versioned distutils
change mongo version to 8
1 parent 565f9e1 commit afaa2c5

File tree

2 files changed

+25
-20
lines changed

2 files changed

+25
-20
lines changed

install.sh

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,25 @@ function install_python_packaging {
3535

3636
function install_python {
3737
local py=$1
38-
sudo apt-get install -y $py $py-dev
38+
sudo apt-get install -y $py
3939
local version=$(echo $py | grep -oP '(?<=python)\d+\.\d+')
4040

41-
if [ "$version" = "3.6" ] || [ "$version" = "3.7" ]; then
42-
sudo apt-get install ${py}-distutils || {
43-
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/pip/$version/get-pip.py | sudo $py
44-
sudo $py -m pip install setuptools
45-
}
46-
elif [ "$version" = "3.10" ] || [ "$version" = "3.11" ] ; then
47-
sudo apt-get install ${py}-distutils
48-
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo $py
49-
else
50-
sudo apt-get install ${py}
51-
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo $py
52-
fi
41+
case $version in
42+
"3.7" | "3.8" | "3.9")
43+
sudo apt-get install ${py}-distutils
44+
;;
45+
*)
46+
echo ""
47+
;;
48+
esac
49+
case $version in
50+
"3.6" | "3.7" | "3.8" )
51+
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/pip/$version/get-pip.py | sudo $py
52+
;;
53+
*)
54+
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo $py
55+
;;
56+
esac
5357
install_python_packaging $py
5458
}
5559

@@ -106,11 +110,13 @@ function update_apt_sources {
106110
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | gpg --dearmor -o /usr/share/keyrings/jenkins-archive-keyring.gpg
107111
echo "deb [signed-by=/usr/share/keyrings/jenkins-archive-keyring.gpg] https://pkg.jenkins.io/debian-stable binary/" | tee /etc/apt/sources.list.d/jenkins.list > /dev/null
108112

109-
# Add MongoDB GPG key and repository
110-
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \
111-
sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
112-
--dearmor
113-
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
113+
MONGODB_MAJOR="8.0"
114+
MONGODB_MINOR="8.2"
115+
curl -fsSL https://www.mongodb.org/static/pgp/server-${MONGODB_MAJOR}.asc | \
116+
gpg -o /usr/share/keyrings/mongodb-server-${MONGODB_MAJOR}.gpg \
117+
--dearmor
118+
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-${MONGODB_MAJOR}.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/${MONGODB_MINOR} multiverse" | tee /etc/apt/sources.list.d/mongodb-org-${MONGODB_MINOR}.list
119+
114120

115121
apt install ca-certificates
116122
apt-get update
@@ -145,7 +151,7 @@ function install_jenkins {
145151
}
146152

147153
function install_mongodb {
148-
apt-get install -y mongodb mongodb-server
154+
apt-get install -y mongodb-org
149155
}
150156

151157
function install_apache {

pytest-server-fixtures/pytest_server_fixtures/mongo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ def get_args(self, **kwargs):
8989
'--port=%s' % self.port,
9090
'--nounixsocket',
9191
'--syncdelay=0',
92-
'--nojournal',
9392
'--quiet',
9493
]
9594

0 commit comments

Comments
 (0)