Class SSHCheckoutTrait

java.lang.Object
hudson.model.AbstractDescribableImpl<T>
jenkins.scm.api.trait.SCMTrait<jenkins.scm.api.trait.SCMSourceTrait>
jenkins.scm.api.trait.SCMSourceTrait
com.cloudbees.jenkins.plugins.bitbucket.SSHCheckoutTrait
All Implemented Interfaces:
ExtensionPoint, Describable<jenkins.scm.api.trait.SCMSourceTrait>

public class SSHCheckoutTrait extends jenkins.scm.api.trait.SCMSourceTrait
A SCMSourceTrait for BitbucketSCMSource that causes the GitSCM checkout to be performed using a SSH private key rather than the Bitbucket username password credentials used for scanning / indexing.
Since:
2.2.0
  • Constructor Details

    • SSHCheckoutTrait

      @DataBoundConstructor public SSHCheckoutTrait(@CheckForNull String credentialsId)
      Constructor.
      Parameters:
      credentialsId - the IdCredentials.getId() of the credentials to use or BitbucketSCMSource.DescriptorImpl.ANONYMOUS to defer to the agent configured credentials (typically anonymous but not always)
  • Method Details

    • getCredentialsId

      @CheckForNull public final String 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 class jenkins.scm.api.trait.SCMSourceTrait