jenkins 多项目环境无法运行与常规作业相同的代码

jenkins 多项目环境无法运行与常规作业相同的代码

以下是 Jenkinsfile 的内容:

node {
git branch: '$BRANCH_NAME', credentialsId: 'IDIDID', url: '[email protected]:SOMEPLACE.git'
sh '''printenv
ls
pwd
cd somedir
virtualenv tmp
source tmp/bin/activate
pip install -e .
pip install tox
make test-ci'''
}

错误:

+ pip install -e .
/home/jenkins/workspace/_JenkinsMultiProjectSupport-KR5YXE6UBANUWSMX2TC4P4IVPW3CHEACQ3YZEOLKRLGWNJAFAA4Q@tmp/durable-9edef277/script.sh: /home/jenkins/workspace/_JenkinsMultiProjectSupport-KR5YXE6UBANUWSMX2TC4P4IVPW3CHEACQ3YZEOLKRLGWNJAFAA4Q/SOMEDIR/tmp/bin/pip: /home/jenkins/workspace/_JenkinsMultiProjectSupport-KR5YXE6UBANUWSMX2TC4P4IVPW: bad interpreter: No such file or directory

多分支项目中的 jenkins 环境与常规环境有何不同?

答案1

因此显然超长路径是 virtualenv 的问题

相关内容