Converted deployment scripts to use pipenv instead of pip

This commit is contained in:
VakarisZ 2021-04-15 11:11:11 +03:00 committed by Mike Salvatore
parent c00754a3a4
commit 47f1bd31cc
2 changed files with 23 additions and 11 deletions

View File

@ -139,14 +139,22 @@ fi
${python_cmd} get-pip.py
rm get-pip.py
log_message "Installing pipenv"
${python_cmd} -m pip install --user -U pipx
${python_cmd} -m pipx ensurepath
source ~/.profile
pipx install pipenv
log_message "Installing island requirements"
requirements_island="$ISLAND_PATH/requirements.txt"
${python_cmd} -m pip install -r "${requirements_island}" --user --upgrade || handle_error
pushd $ISLAND_PATH
pipenv install --dev
popd
log_message "Installing monkey requirements"
sudo apt-get install -y libffi-dev upx libssl-dev libc++1
requirements_monkey="$INFECTION_MONKEY_DIR/requirements.txt"
${python_cmd} -m pip install -r "${requirements_monkey}" --user --upgrade || handle_error
pushd $INFECTION_MONKEY_DIR
pipenv install --dev
popd
agents=${3:-true}
# Download binaries

View File

@ -126,15 +126,19 @@ function Deploy-Windows([String] $monkey_home = (Get-Item -Path ".\").FullName,
return
}
"Installing pipx"
pip install --user -U pipx
pipx ensurepath
pipx install pipenv
"Installing python packages for island"
$islandRequirements = Join-Path -Path $monkey_home -ChildPath $MONKEY_ISLAND_DIR | Join-Path -ChildPath "\requirements.txt" -ErrorAction Stop
& python -m pip install --user -r $islandRequirements
Push-Location -Path (Join-Path -Path $monkey_home -ChildPath $MONKEY_ISLAND_DIR) -ErrorAction Stop
pipenv install --dev
Pop-Location
"Installing python packages for monkey"
$monkeyRequirements = Join-Path -Path $monkey_home -ChildPath $MONKEY_DIR | Join-Path -ChildPath "\requirements.txt"
& python -m pip install --user -r $monkeyRequirements
"Installing python packages for ScoutSuite"
$scoutsuiteRequirements = Join-Path -Path $monkey_home -ChildPath $SCOUTSUITE_DIR | Join-Path -ChildPath "\requirements.txt"
& python -m pip install --user -r $scoutsuiteRequirements
Push-Location -Path (Join-Path -Path $monkey_home -ChildPath $MONKEY_DIR) -ErrorAction Stop
pipenv install --dev
Pop-Location
Configure-precommit($monkey_home)