在何处设置-Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL = 300 [英] Where to set -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=300
问题描述
运行管道dsl jenkins作业时,我从持久性任务插件中收到错误消息.
I am getting errors from the durable task plugin when I run my pipeline dsl jenkins job.
错误消息建议我应该使用:
The error message suggests that I should use:
-Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=300
这是我得到的错误:
\workspace\ne-sw-manifest_master-5ZF5EWBP7EVBXEBF6AS3C6UQLIXLCS3HRKYND6TPQAPIKZPFBDLQ@tmp\durable-252b3bfd
(JENKINS-48300: if on a laggy filesystem, consider -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=300)
我不确定要在哪里设置此属性.
我尝试过Jenkins master->配置系统->全局属性->环境变量:
I tried on Jenkins master -> Configure system -> Global properties -> Environment variables:
Name:org.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL
Value:300
但是,我不确定这是否是添加此属性的正确位置,或者它是否已生效.
But, I am not sure if this is the right place to add this property OR if it has come into effect.
此外,我还没有重新启动主服务器或从服务器.
Also, I haven't restarted the master or slave.
我的jenkins设置是Linux master(Jenkins 2.107.1版)以及Linux和Windows Slaves.
My jenkins set-up is Linux master (Jenkins ver. 2.107.1) and Linux and Windows Slaves.
我的构建在Windows从站(物理机)上
My build is on a Windows slave (physical machine)
推荐答案
选项1: 添加您的管道
script {
System.setProperty("org.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL", "3800");
}
script {
System.setProperty("org.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL", "3800");
}
在运行Jenkins –进行中的脚本批准"中的安全设置中批准脚本后.
after Running the approve the script in security settings at Manage Jenkins – In-process Script approval.
选项2:
去管理Jenkins->脚本控制台 并运行
go to Manage Jenkins -> Script Console and run
System.setProperty("org.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL", "3800");
这篇关于在何处设置-Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL = 300的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!