fix(dependencies): disable caching for PIP installations and log a message
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
8dd6b32935
commit
b5bc7a09c6
@ -59,13 +59,14 @@ class DependenciesResolver {
|
||||
def requirementsFile = configurations.requirementsFile
|
||||
|
||||
if (cachingEnabled) {
|
||||
steps.dir(this.workspace) {
|
||||
steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', includes: '**/*', path: ".${configurations.name}-pip-cache", cacheValidityDecidingFile: 'requirements.txt']]) {
|
||||
steps.sh "mkdir -p .${configurations.name}-pip-cache"
|
||||
steps.sh "pip config set global.cache-dir '${this.workspace}.${configurations.name}-pip-cache'"
|
||||
steps.sh "pip install --cache-dir .${configurations.name}-pip-cache -r ${requirementsFile}"
|
||||
}
|
||||
}
|
||||
// steps.dir(this.workspace) {
|
||||
// steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', includes: '**/*', path: ".${configurations.name}-pip-cache", cacheValidityDecidingFile: 'requirements.txt']]) {
|
||||
// steps.sh "mkdir -p .${configurations.name}-pip-cache"
|
||||
// steps.sh "pip config set global.cache-dir '${this.workspace}.${configurations.name}-pip-cache'"
|
||||
// steps.sh "pip install --cache-dir .${configurations.name}-pip-cache -r ${requirementsFile}"
|
||||
// }
|
||||
// }
|
||||
steps.log.info("Dependencies Resolver","Caching is not supported for PIP")
|
||||
} else {
|
||||
steps.dir(this.workspace) {
|
||||
steps.sh "pip install -r ${requirementsFile}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user