Class SSHCheckoutTrait
java.lang.Object
hudson.model.AbstractDescribableImpl<T>
jenkins.scm.api.trait.SCMTrait<jenkins.scm.api.trait.SCMSourceTrait>
jenkins.scm.api.trait.SCMSourceTrait
org.jenkinsci.plugins.github_branch_source.SSHCheckoutTrait
- All Implemented Interfaces:
ExtensionPoint
,Describable<jenkins.scm.api.trait.SCMSourceTrait>
public class SSHCheckoutTrait
extends jenkins.scm.api.trait.SCMSourceTrait
A
SCMSourceTrait
for GitHubSCMSource
that causes the GitSCM
checkout to
be performed using a SSH private key rather than the GitHub username password credentials used
for scanning / indexing.- Since:
- 2.2.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
decorateBuilder
(jenkins.scm.api.trait.SCMBuilder<?, ?> builder) final String
Returns the configured credentials id.Methods inherited from class jenkins.scm.api.trait.SCMSourceTrait
_for, _for, all, applyToBuilder, applyToContext, applyToObserver, decorateContext, decorateObserver, getDescriptor, includeCategory, isCategoryEnabled
Methods inherited from class jenkins.scm.api.trait.SCMTrait
asSetList, asSetList, find
-
Constructor Details
-
SSHCheckoutTrait
Constructor.- Parameters:
credentialsId
- theIdCredentials.getId()
of the credentials to use orGitHubSCMSource.DescriptorImpl.ANONYMOUS
to defer to the agent configured credentials (typically anonymous but not always)
-
-
Method Details
-
getCredentialsId
Returns the configured credentials id.- Returns:
- the configured credentials id or
null
to use the build agent's key.
-
decorateBuilder
protected void decorateBuilder(jenkins.scm.api.trait.SCMBuilder<?, ?> builder) - Overrides:
decorateBuilder
in classjenkins.scm.api.trait.SCMSourceTrait
-