简体   繁体   中英

How to permanently set the Jenkins system property for Git plugin timeout?

I have read that the Git plugin has a configuration property that enables me to change the timeout on git operations (currently 400) [1,2]. The reason I want to change this is that right now I frequently see that there is a process running and taking up gobs of CPU. The last part of its properties show:

...lifecycle -jar "...jenkins.war" --httpPort=8080 -Dorg.jenkinsci.plugins.gitclient.Git.timeOut=400

I found two code changes (in different places) by reading the jira tickets:

public static int TIMEOUT = Integer.getInteger(Git.class.getName() + ".timeOut", 10);

f.entry(title:_("Timeout (in minutes) for clone and fetch operations"), field:"timeout") {

I cannot see anything in the GUI to modify the timeout.

I tried adding to both my .\\Jenkins\\plugins\\git-client\\META-INF\\maven\\org.jenkins-ci.plugins\\git-client\\pom.xml's properties section: 30

I read that changing the java call will work, but I want every restart/etc to persist this change, so I would like to edit a file somewhere to do it. Is there a way to do this? My Jenkins is on Windows Server 2012, in case that changes things. thank you!

1.[] ;1.10.1 (July 30, 2014) Timeout on checkout can be adjusted (JENKINS-22400) ; ; https://wiki.jenkins-ci.org/display/JENKINS/Git+Client+Plugin

2.[] ; ; X.[JENKINS-11286] Git plugin does not timeout - Jenkins JIRA ; ; https://issues.jenkins-ci.org/browse/JENKINS-11286

For checkout operations you can specify a timeout with SCM -> Git -> Additional behaviours -> Add -> Advanced Checkout behaviours -> Timeout (in minutes) for checkout operation

For fetching you do this with SCM -> Git -> Additional behaviours -> Add -> Advanced clone behaviours -> Timeout (in minutes) for clone and fetch operations

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM