gpt4 book ai didi

jenkins - jenkins中执行groovy脚本和执行系统groovy脚本的区别?

转载 作者:行者123 更新时间:2023-12-03 13:34:40 26 4
gpt4 key购买 nike

谁能解释jenkins中执行groovy脚本和执行系统groovy脚本之间的区别?以及如何使用执行系统常规脚本将脚本调用为从属。

最佳答案

要在从机上执行 groovy 脚本,您应该使用 groovy plugin

引用

The plain "Groovy Script" is run in a forked JVM, on the slave where the build is run. It's the basically the same as running the "groovy" command and pass in the script.



您问题的第一部分在同一页面中得到解答

The system groovy script, OTOH, runs inside the Hudson master's JVM. Thus it will have access to all the internal objects of Hudson, so you can use this to alter the state of Hudson. It is similar to the Jenkins Script Console functionality.

关于jenkins - jenkins中执行groovy脚本和执行系统groovy脚本的区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19634733/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com