【发布时间】:2016-10-17 10:35:15
【问题描述】:
参考文档: https://jenkinsci.github.io/job-dsl-plugin/#path/freeStyleJob-steps-python 我正在尝试通过 groovy 自动配置我的工作。 该作业将执行一个 python 代码片段。像这样的:
import os
from Reporting.MSTest import MSTest
jsonFile = os.path.join(os.getenv('temp')
这里是代码 sn-p。这将在作业构建步骤中添加上述 python 脚本
# the job name is "jobName"
jobA = freeStyleJob("jobName")
jobA.with {
steps {
python {
command(String 'import os')
}
}
}
它不工作。请帮忙!
【问题讨论】:
-
command包含 python 脚本的文件名,而不是 python 代码