Merge "Support SSHCheckout trait"
This commit is contained in:
commit
8bc2ad3b62
|
@ -660,6 +660,7 @@ def github_scm(xml_parent, data):
|
|||
|
||||
:arg str api-uri: The GitHub API uri for hosted / on-site GitHub. Must
|
||||
first be configured in Global Configuration. (default GitHub)
|
||||
:arg bool ssh-checkout: Checkout over SSH. (default false)
|
||||
:arg str credentials-id: Credentials used to scan branches and pull
|
||||
requests, check out sources and mark commit statuses. (optional)
|
||||
:arg str repo-owner: Specify the name of the GitHub Organization or
|
||||
|
@ -735,6 +736,13 @@ def github_scm(xml_parent, data):
|
|||
helpers.convert_mapping_to_xml(
|
||||
bd, data, bd_mapping, fail_required=True)
|
||||
|
||||
if data.get('ssh-checkout', False):
|
||||
XML.SubElement(
|
||||
traits, ''.join([
|
||||
github_path_dscore, '.SSHCheckoutTrait'
|
||||
])
|
||||
)
|
||||
|
||||
if data.get('discover-tags', False):
|
||||
XML.SubElement(
|
||||
traits, ''.join([
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
<org.jenkinsci.plugins.github__branch__source.BranchDiscoveryTrait>
|
||||
<strategyId>3</strategyId>
|
||||
</org.jenkinsci.plugins.github__branch__source.BranchDiscoveryTrait>
|
||||
<org.jenkinsci.plugins.github__branch__source.SSHCheckoutTrait/>
|
||||
<org.jenkinsci.plugins.github__branch__source.TagDiscoveryTrait/>
|
||||
<org.jenkinsci.plugins.github__branch__source.ForkPullRequestDiscoveryTrait>
|
||||
<strategyId>3</strategyId>
|
||||
|
|
|
@ -4,6 +4,7 @@ script-path: some.Jenkinsfile
|
|||
scm:
|
||||
- github:
|
||||
api-uri: http://example.org/github
|
||||
ssh-checkout: true
|
||||
repo: example-repo
|
||||
repo-owner: example-owner
|
||||
credentials-id: example-credential
|
||||
|
|
Loading…
Reference in New Issue