我计划在浏览器中打开一个URL作为Jenkins中的后期构建步骤。我尝试使用Pipeline Jenkins并包含以下代码:
node {
stage ("execute"){
bat 'start www.google.com'
}
}
我的输出为:
Started by user anonymous
[Pipeline] node
Running on master in C:\Program Files (x86)\Jenkins\workspace\free
[Pipeline] {
[Pipeline] stage
[Pipeline] { (execute)
[Pipeline] bat
[free] Running batch script
C:\Program Files (x86)\Jenkins\workspace\free>start www.google.com
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS
但指定的URL未在浏览器中打开。当我在命令提示符下运行相同的命令start www.google.com
时,它将在默认浏览器中打开Google站点。怎么解决这个问题?