fix(dependencies): correct pip cache directory path formatting in DependenciesResolver

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-02-22 23:27:55 +08:00
parent 1975370dcf
commit 8dd6b32935

View File

@ -62,7 +62,7 @@ class DependenciesResolver {
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 config set global.cache-dir '${this.workspace}.${configurations.name}-pip-cache'"
steps.sh "pip install --cache-dir .${configurations.name}-pip-cache -r ${requirementsFile}"
}
}