Reputation: 35
One of our jobs runs timeout at the following command:
git checkout -f <commit>
The timeout is 10 minutes by default. I tried to execute it manually, it takes a bit more than 10 minutes. I set it to 20 minutes in the job's configure menu, but it doesn't work.
Advanced checkout behaviours:
Timeout (in minutes) for checkout operation: 20
Our Git Plugin version is 2.3.4. I read some posts about downgrade the version, but currently i can't try this option (i'm not allowed), so i decided to set the global timeout value.
Can someone tell me how to do this (in jenkins-slave.xml or command line)?
Upvotes: 3
Views: 3439
Reputation: 1469
If the version you're using doesn't have this setting, you can change it through a global Java property, either globally for your Jenkins or only for the Jenkins slave you need to change this timeout.
The JVM property to set is -Dorg.jenkinsci.plugins.gitclient.Git.timeOut=12345
where 12345
is the timeout value in minutes. For a Jenkins slave, this can be set in the additional properties of the launch configuration. If you want to change it globally for Jenkins, you'll need to check your system scripts.
More information about this feature in this Jenkins issue and discussion.
Upvotes: 1
Reputation: 22119
My Git plugin version is 2.3.5 and below configurations works for me.
Additional Behaviours-->Advanced checkout behaviours-->
Timeout (in minutes) for checkout operation: 20
Upvotes: 3