Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to set -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=300

Tags:

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

This is the error I get:

\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)

I am not sure where to set this property.

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.

My jenkins set-up is Linux master (Jenkins ver. 2.107.1) and Linux and Windows Slaves.

My build is on a Windows slave (physical machine)

like image 585
user9711638 Avatar asked Apr 27 '18 17:04

user9711638


People also ask

How do I set environment variables?

On the Windows taskbar, right-click the Windows icon and select System. In the Settings window, under Related Settings, click Advanced system settings. On the Advanced tab, click Environment Variables. Click New to create a new environment variable.

How do I set environment variable in CMD?

To set an environment variable, use the command " export varname=value ", which sets the variable and exports it to the global environment (available to other processes). Enclosed the value with double quotes if it contains spaces. To set a local variable, use the command " varname =value " (or " set varname =value ").


1 Answers

option 1: Add in your pipeline

script { System.setProperty("org.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL", "3800"); }

after Running the approve the script in security settings at Manage Jenkins – In-process Script approval.

Option 2:

go to Manage Jenkins -> Script Console and run

System.setProperty("org.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL", "3800");
like image 67
Khalid Bin Huda Avatar answered Sep 19 '22 11:09

Khalid Bin Huda