@@ -28,28 +28,33 @@ function install_python_ppa {
2828function install_python_packaging {
2929 local py=$1
3030 $py -m pip install --upgrade pip
31- $py -m pip install --upgrade setuptools
31+ $py -m pip install --upgrade setuptools wheel
32+ $py -m pip install --upgrade packaging
3233 $py -m pip install --upgrade virtualenv
3334}
3435
3536
3637function install_python {
3738 local py=$1
38- sudo apt-get install -y $py $py -dev
39+ sudo apt-get install -y $py
3940 local version=$( echo $py | grep -oP ' (?<=python)\d+\.\d+' )
40-
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.6" | " 3.7" | " 3.8" | " 3.9" )
43+ sudo apt-get install -y $py -distutils
44+ ;;
45+ * )
46+ echo " "
47+ ;;
48+ esac
49+
50+ case $version in
51+ " 3.6" | " 3.7" | " 3.8" )
52+ curl --silent --show-error --retry 5 https://bootstrap.pypa.io/pip/$version /get-pip.py | sudo $py
53+ ;;
54+ * )
55+ curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo $py
56+ ;;
57+ esac
5358 install_python_packaging $py
5459}
5560
@@ -92,7 +97,7 @@ function install_windows_python() {
9297
9398function init_venv {
9499 local py=$1
95- virtualenv venv --python= $py
100+ $py -m virtualenv venv
96101 if [ -f venv/Scripts/activate ]; then
97102 . venv/Scripts/activate
98103 else
@@ -106,11 +111,13 @@ function update_apt_sources {
106111 curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | gpg --dearmor -o /usr/share/keyrings/jenkins-archive-keyring.gpg
107112 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
108113
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
114+ MONGODB_MAJOR=" 8.0"
115+ MONGODB_MINOR=" 8.2"
116+ curl -fsSL https://www.mongodb.org/static/pgp/server-${MONGODB_MAJOR} .asc | \
117+ gpg -o /usr/share/keyrings/mongodb-server-${MONGODB_MAJOR} .gpg \
118+ --dearmor
119+ 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
120+
114121
115122 apt install ca-certificates
116123 apt-get update
@@ -145,7 +152,7 @@ function install_jenkins {
145152}
146153
147154function install_mongodb {
148- apt-get install -y mongodb mongodb-server
155+ apt-get install -y mongodb-org
149156}
150157
151158function install_apache {
0 commit comments