Jenkins pipeline withenv and step not 运行 with environmental variables specified
Jenkins pipeline withenv and step not run with environmental variables specified
我有一个管道脚本,它在 withEnv 块中使用以下步骤:
withEnv(['Repository_name=Repo',
'capability_squish=c:\Squish',"build_working_directory=${workspace}"]) {
bat "python test.py"
step([$class: 'SquishBuilder',
abortBuildOnError: false,
extraOptions: '',
host: '127.0.0.1',
port: '4322',
resultFolder: "${workspace}\squish-test-reports\",
skipTestCases: false,
snoozeFactor: '1',
squishConfig: 'demo_gui',
testCase: '',
testSuite: "${workspace}\suite_default"])
}
问题是该步骤没有 运行 我期望的环境变量,行
bat "python test.py"
执行并输出预期的变量并按预期工作,有人知道为什么该步骤不使用环境变量吗?
或者知道我在这里做错了什么吗?
我猜这是 Jenkins 或插件的问题。
截至发布时,这是 Jenkins 管道中的一个问题。
我有一个管道脚本,它在 withEnv 块中使用以下步骤:
withEnv(['Repository_name=Repo',
'capability_squish=c:\Squish',"build_working_directory=${workspace}"]) {
bat "python test.py"
step([$class: 'SquishBuilder',
abortBuildOnError: false,
extraOptions: '',
host: '127.0.0.1',
port: '4322',
resultFolder: "${workspace}\squish-test-reports\",
skipTestCases: false,
snoozeFactor: '1',
squishConfig: 'demo_gui',
testCase: '',
testSuite: "${workspace}\suite_default"])
}
问题是该步骤没有 运行 我期望的环境变量,行
bat "python test.py"
执行并输出预期的变量并按预期工作,有人知道为什么该步骤不使用环境变量吗? 或者知道我在这里做错了什么吗? 我猜这是 Jenkins 或插件的问题。
截至发布时,这是 Jenkins 管道中的一个问题。