public class GitRepository extends VcsRepository<GitRepository,GitRepositoryProperties>
description, name, oid, parent, repositoryViewer, TYPE
Constructor and Description |
---|
GitRepository() |
Modifier and Type | Method and Description |
---|---|
GitRepository |
authentication(SharedCredentialsIdentifier sharedCredentialsIdentifier)
Selects a previously defined
SharedCredentials to authenticate with git server. |
GitRepository |
authentication(SshPrivateKeyAuthentication sshPrivateKeyAuthentication)
Specifies SSH private key authentication.
|
GitRepository |
authentication(UserPasswordAuthentication userPasswordAuthentication)
Specifies username/password authentication.
|
GitRepository |
branch(String branch)
Sets branch to check out.
|
protected GitRepositoryProperties |
build() |
GitRepository |
changeDetection(VcsChangeDetection vcsChangeDetection)
Sets change detection options for this repository.
|
GitRepository |
commandTimeout(Duration commandTimeout)
Specifies how much time is given for git commands to finish.
|
GitRepository |
commandTimeoutInMinutes(int commandTimeoutMinutes)
Specifies how much time in minutes is given for git commands to finish.
|
GitRepository |
defaultChangeDetection()
Resets all change detection options to defaults.
|
GitRepository |
fetchWholeRepository(boolean fetchWholeRepository)
Enforces (or not) fetching all remote refs from the repository rather than single branch.
|
GitRepository |
lfsEnabled(boolean useLfs)
Enables/disables git lfs support.
|
GitRepository |
remoteAgentCacheEnabled(boolean useRemoteAgentCache)
Enables/disables caching repository content on the remote and elastic agents.
|
GitRepository |
shallowClonesEnabled(boolean useShallowClones)
Enables/disables shallow clones when checking out from the repository.
|
GitRepository |
submodulesEnabled(boolean useSubmodules)
Enables/disables submodule support.
|
GitRepository |
url(String url)
Sets git repository url.
|
GitRepository |
verboseLogs(boolean verboseLogs)
Enables/disables verbose logs from git commands.
|
GitRepository |
withoutAuthentication()
Removes authentication details.
|
description, getIdentifier, getName, getOid, humanReadableId, humanReadableType, name, oid, oid, parent, repositoryViewer
public GitRepository url(@NotNull String url)
url
- repository urlpublic GitRepository branch(@NotNull String branch)
public GitRepository withoutAuthentication()
public GitRepository authentication(@NotNull SharedCredentialsIdentifier sharedCredentialsIdentifier)
SharedCredentials
to authenticate with git server. Currently SSH and username/password credentials are supported.public GitRepository authentication(@NotNull UserPasswordAuthentication userPasswordAuthentication)
public GitRepository authentication(@NotNull SshPrivateKeyAuthentication sshPrivateKeyAuthentication)
public GitRepository shallowClonesEnabled(boolean useShallowClones)
public GitRepository submodulesEnabled(boolean useSubmodules)
public GitRepository remoteAgentCacheEnabled(boolean useRemoteAgentCache)
public GitRepository commandTimeout(Duration commandTimeout)
public GitRepository commandTimeoutInMinutes(int commandTimeoutMinutes)
public GitRepository verboseLogs(boolean verboseLogs)
public GitRepository fetchWholeRepository(boolean fetchWholeRepository)
public GitRepository lfsEnabled(boolean useLfs)
public GitRepository defaultChangeDetection()
public GitRepository changeDetection(@NotNull VcsChangeDetection vcsChangeDetection)
VcsChangeDetection
protected GitRepositoryProperties build()
build
in class VcsRepository<GitRepository,GitRepositoryProperties>
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.