Class 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 Detail

      • 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 Detail

      • 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