Tom*_*eyn 5 jenkins jenkins-pipeline jenkins-2
如何将当前工作区中的文件作为参数传递给构建作业,例如:
build job: 'other-project', parameters: [[$class: 'FileParameterValue', ????]]
Run Code Online (Sandbox Code Playgroud)
您可以传递文件的完整路径,您可以这样做:
node('master') {
//Read the workspace path
String path = pwd();
String pathFile = "${path}/exampleDir/fileExample.ext";
//Do whatever you wish with the file path
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9431 次 |
| 最近记录: |