2016-03-24 58 views

回答

0

沒有原生選項,我猜。最近詹金斯建立允許更短的方式來訪問控制檯輸出 - 只需點擊左邊當前正在運行的構建灰/藍點:

One click access to Console output 如果你仍然認爲點擊是惱人的額外的步驟,那麼接下來的選項我會建議使用jenkins CLI。但它需要一些更多的一次性努力。

  1. 工作站上了Java安裝
  2. 下載詹金斯-cli.jar從http:// 你詹金斯舉辦 /jnlpJars/jenkins-cli.jar

然後就可以開始建立像這樣:

java -jar jenkins-cli.jar -s http://jenkins-url build buildname -w -s -v -p parameterN=valueN 



java -jar jenkins-cli.jar -noKeyAuth -s http://jet:8080 build tst-so -w -s -v -p host2ping=google.com 
Started tst-so #17 
Started from command line by anonymous 
Building in workspace /var/lib/jenkins/jobs/tst-so/workspace 
[workspace] $ /bin/sh -xe /tmp/hudson5079113569382475588.sh 
+ echo Hello from tst-so job 
Hello from tst-so job 
+ ping -c 6 google.com 
PING google.com (216.58.209.206) 56(84) bytes of data. 
64 bytes from bud02s22-in-f14.1e100.net (216.58.209.206): icmp_seq=1 ttl=54 time=51.6 ms 
64 bytes from bud02s22-in-f14.1e100.net (216.58.209.206): icmp_seq=2 ttl=54 time=51.9 ms 
64 bytes from bud02s22-in-f14.1e100.net (216.58.209.206): icmp_seq=3 ttl=54 time=51.8 ms 
64 bytes from bud02s22-in-f14.1e100.net (216.58.209.206): icmp_seq=4 ttl=54 time=51.8 ms 
64 bytes from bud02s22-in-f14.1e100.net (216.58.209.206): icmp_seq=5 ttl=54 time=51.8 ms 
64 bytes from bud02s22-in-f14.1e100.net (216.58.209.206): icmp_seq=6 ttl=54 time=51.7 ms 

--- google.com ping statistics --- 
6 packets transmitted, 6 received, 0% packet loss, time 5009ms 
rtt min/avg/max/mdev = 51.684/51.815/51.900/0.306 ms 
Finished: SUCCESS 
Completed tst-so #17 : SUCCESS 

在我的例子jenkins是由於簡單的原因沒有身份驗證設置。