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
|
:arg str api-uri: The GitHub API uri for hosted / on-site GitHub. Must
|
||||||
first be configured in Global Configuration. (default GitHub)
|
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
|
:arg str credentials-id: Credentials used to scan branches and pull
|
||||||
requests, check out sources and mark commit statuses. (optional)
|
requests, check out sources and mark commit statuses. (optional)
|
||||||
:arg str repo-owner: Specify the name of the GitHub Organization or
|
: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(
|
helpers.convert_mapping_to_xml(
|
||||||
bd, data, bd_mapping, fail_required=True)
|
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):
|
if data.get('discover-tags', False):
|
||||||
XML.SubElement(
|
XML.SubElement(
|
||||||
traits, ''.join([
|
traits, ''.join([
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
<org.jenkinsci.plugins.github__branch__source.BranchDiscoveryTrait>
|
<org.jenkinsci.plugins.github__branch__source.BranchDiscoveryTrait>
|
||||||
<strategyId>3</strategyId>
|
<strategyId>3</strategyId>
|
||||||
</org.jenkinsci.plugins.github__branch__source.BranchDiscoveryTrait>
|
</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.TagDiscoveryTrait/>
|
||||||
<org.jenkinsci.plugins.github__branch__source.ForkPullRequestDiscoveryTrait>
|
<org.jenkinsci.plugins.github__branch__source.ForkPullRequestDiscoveryTrait>
|
||||||
<strategyId>3</strategyId>
|
<strategyId>3</strategyId>
|
||||||
|
|
|
@ -4,6 +4,7 @@ script-path: some.Jenkinsfile
|
||||||
scm:
|
scm:
|
||||||
- github:
|
- github:
|
||||||
api-uri: http://example.org/github
|
api-uri: http://example.org/github
|
||||||
|
ssh-checkout: true
|
||||||
repo: example-repo
|
repo: example-repo
|
||||||
repo-owner: example-owner
|
repo-owner: example-owner
|
||||||
credentials-id: example-credential
|
credentials-id: example-credential
|
||||||
|
|
Loading…
Reference in New Issue