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

前端 未结 3 1538
太阳男子
太阳男子 2021-02-07 06:44

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.pl         


        
相关标签:
3条回答
  • 2021-02-07 07:22

    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");
    
    0 讨论(0)
  • 2021-02-07 07:33

    This CloudBees article explains how to set Jenkins Java arguments.

    Note: you'll need to restart your Jenkins instance.

    Edit: As per sirch's comment, I'm copying here the instructions for RedHat and Debian distro's.

    Debian / Ubuntu based Linux distributions

    If your configuration file is under /etc/default/ look for the argument JAVA_ARGS. It should look something like this:

    JAVA_ARGS="-Djava.awt.headless=true"

    Then, add the arguments:

    JAVA_ARGS="-Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true"

    RedHat Linux based distributions

    If your configuration file is under /etc/sysconfig/ look for the argument JENKINS_JAVA_OPTIONS. It should look something like this:

    JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true"

    Then, add the arguments:

    JENKINS_JAVA_OPTIONS="-Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true"

    0 讨论(0)
  • 2021-02-07 07:40

    set it either

    JAVA_OPTS

    or

    JNLP_PROTOCOL_OPTS

    which will be included in jenkins slave Startup Options

    0 讨论(0)
提交回复
热议问题