Skip to content

Commit

Permalink
Use local pip storage for offline deploy
Browse files Browse the repository at this point in the history
PROD-36734
Change-Id: I4cf702a709585174513b92c17b5f93567451d326
  • Loading branch information
theilluminate committed Feb 24, 2022
1 parent 406b58a commit 6fb7a50
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/com/mirantis/mk/Python.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ def setupVirtualenv(path, python = 'python2', reqs=[], reqs_path=null, clean=fal
writeFile file: "${path}/requirements.txt", text: args
reqs_path = "${path}/requirements.txt"
}
runVirtualenvCommand(path, "pip install -r ${reqs_path}", true)

def install_cmd = 'pip install'
if (offlineDeployment) {
install_cmd += " --find-links=/opt/pip-mirror "
}
runVirtualenvCommand(path, "${install_cmd} -r ${reqs_path}", true)
}

/**
Expand Down

0 comments on commit 6fb7a50

Please sign in to comment.