当我手动执行jenkins作业时,如果在提交构建按钮时,下一个屏幕是控制台输出而不是项目页面,则会节省一个恼人的步骤。
是否有允许这种情况发生的配置设置?
答案 0 :(得分:0)
我猜没有那种本地选择。最近的jenkins构建允许更短的方式访问控制台输出 - 只需单击当前正在运行的构建左侧的灰色/蓝色点:
如果您仍然认为单击是令人烦恼的额外步骤,那么我建议的下一个选项是使用jenkins CLI。它需要更多的一次性努力。
然后你可以开始这样的构建:
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没有进行身份验证。