所以我有 jenkins
管道,我正在以这种方式运行我的 python script
:
stage('Running python script') {
steps {
echo "Run script"
bat "python D:\\srcipt.py --n 10"
}
}
所以这个脚本运行,我可以看到它打印的所有行,但我也想得到它返回的``。
有可能吗?
答案 0 :(得分:0)
您可以尝试使用 returnStdout:true
选项。
它看起来像
def result = bat script: "python D:\\srcipt.py --n 10", returnStdout: true