在哪里设置 -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
e-sw-manifest_master-5ZF5EWBP7EVBXEBF6AS3C6UQLIXLCS3HRKYND6TPQAPIKZPFBDLQ@tmpdurable-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:添加到您的管道中
<代码>脚本{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屋!