mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-21 12:39:08 +01:00
SERVER-94662 Retry pipx install db-contrib-tool (#26948)
GitOrigin-RevId: 0d3bbbaa49475e9a44af364365659f8b78535ee7
This commit is contained in:
parent
ba0cbf3b83
commit
2da1d0fe7d
@ -5,9 +5,35 @@ function setup_db_contrib_tool {
|
||||
export PIPX_BIN_DIR="${workdir}/pipx/bin"
|
||||
export PATH="$PATH:$PIPX_BIN_DIR"
|
||||
|
||||
python -m pip --disable-pip-version-check install "pip==21.0.1" "wheel==0.37.0" || exit 1
|
||||
# We force reinstall here because when we download the previous venv the shebang
|
||||
# in pipx still points to the old machines python location.
|
||||
python -m pip --disable-pip-version-check install --force-reinstall --no-deps "pipx==1.6.0" || exit 1
|
||||
pipx install "db-contrib-tool==0.8.5" --pip-args="--no-cache-dir" || exit 1
|
||||
for i in {1..5}; do
|
||||
python -m pip --disable-pip-version-check install "pip==21.0.1" "wheel==0.37.0" && RET=0 && break || RET=$? && sleep 1
|
||||
echo "Failed to install pip and wheel, retrying..."
|
||||
done
|
||||
|
||||
if [ $RET -ne 0 ]; then
|
||||
echo "Failed to install pip and wheel"
|
||||
exit $RET
|
||||
fi
|
||||
|
||||
for i in {1..5}; do
|
||||
# We force reinstall here because when we download the previous venv the shebang
|
||||
# in pipx still points to the old machines python location.
|
||||
python -m pip --disable-pip-version-check install --force-reinstall --no-deps "pipx==1.6.0" && RET=0 && break || RET=$? && sleep 1
|
||||
echo "Failed to install pipx, retrying..."
|
||||
done
|
||||
|
||||
if [ $RET -ne 0 ]; then
|
||||
echo "Failed to install pipx"
|
||||
exit $RET
|
||||
fi
|
||||
|
||||
for i in {1..5}; do
|
||||
pipx install --force "db-contrib-tool==0.8.5" --pip-args="--no-cache-dir" && RET=0 && break || RET=$? && sleep 1
|
||||
echo "Failed to install db-contrib-tool, retrying..."
|
||||
done
|
||||
|
||||
if [ $RET -ne 0 ]; then
|
||||
echo "Failed to install db-contrib-tool"
|
||||
exit $RET
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user