git: Support timeout option
This requires git plugin version 2.2.3 Change-Id: I24a2bce00e35f74a5c513d02a7bffe05267cd498
This commit is contained in:
parent
ca6335d770
commit
0268581fca
@ -96,6 +96,7 @@ remoteName/\*')
|
|||||||
(default 'default')
|
(default 'default')
|
||||||
:arg str git-config-name: Configure name for Git clone (optional)
|
:arg str git-config-name: Configure name for Git clone (optional)
|
||||||
:arg str git-config-email: Configure email for Git clone (optional)
|
:arg str git-config-email: Configure email for Git clone (optional)
|
||||||
|
:arg str timeout: Timeout for git commands in minutes (optional)
|
||||||
|
|
||||||
:browser values:
|
:browser values:
|
||||||
:auto:
|
:auto:
|
||||||
@ -222,6 +223,13 @@ remoteName/\*')
|
|||||||
if 'local-branch' in data:
|
if 'local-branch' in data:
|
||||||
XML.SubElement(scm, 'localBranch').text = data['local-branch']
|
XML.SubElement(scm, 'localBranch').text = data['local-branch']
|
||||||
|
|
||||||
|
if 'timeout' in data:
|
||||||
|
ext = XML.SubElement(scm, 'extensions')
|
||||||
|
co = XML.SubElement(ext,
|
||||||
|
'hudson.plugins.git.extensions.impl.'
|
||||||
|
'CheckoutOption')
|
||||||
|
XML.SubElement(co, 'timeout').text = str(data['timeout'])
|
||||||
|
|
||||||
browser = data.get('browser', 'auto')
|
browser = data.get('browser', 'auto')
|
||||||
browserdict = {'auto': 'auto',
|
browserdict = {'auto': 'auto',
|
||||||
'bitbucketweb': 'BitbucketWeb',
|
'bitbucketweb': 'BitbucketWeb',
|
||||||
|
@ -37,6 +37,11 @@
|
|||||||
<scmName/>
|
<scmName/>
|
||||||
<useShallowClone>false</useShallowClone>
|
<useShallowClone>false</useShallowClone>
|
||||||
<ignoreNotifyCommit>false</ignoreNotifyCommit>
|
<ignoreNotifyCommit>false</ignoreNotifyCommit>
|
||||||
|
<extensions>
|
||||||
|
<hudson.plugins.git.extensions.impl.CheckoutOption>
|
||||||
|
<timeout>20</timeout>
|
||||||
|
</hudson.plugins.git.extensions.impl.CheckoutOption>
|
||||||
|
</extensions>
|
||||||
<browser class="hudson.plugins.git.browser.GithubWeb">
|
<browser class="hudson.plugins.git.browser.GithubWeb">
|
||||||
<url>http://github.com/foo/example.git</url>
|
<url>http://github.com/foo/example.git</url>
|
||||||
</browser>
|
</browser>
|
||||||
|
@ -6,3 +6,4 @@ scm:
|
|||||||
- stable
|
- stable
|
||||||
browser: githubweb
|
browser: githubweb
|
||||||
browser-url: http://github.com/foo/example.git
|
browser-url: http://github.com/foo/example.git
|
||||||
|
timeout: 20
|
||||||
|
Loading…
x
Reference in New Issue
Block a user