Class GitRepositoryHelper
java.lang.Object
com.atlassian.bamboo.testutils.vcs.git.GitRepositoryHelper
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddFile(@NotNull GitRepositoryDescriptor repositoryDescriptor, @NotNull File file, @NotNull String commitMessage) static voidcheckoutBranch(@NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull String branchName) static voidcreateBranch(@NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull String branchName) static voidcreateTag(@NotNull GitRepositoryDescriptor clonedWorkspace, String tagName, boolean isLightweightTag, boolean push) static voiddeleteBranch(@NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull String branchName) static voidpushBranch(@NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull String branchName) static @Nullable StringreadChangeSetId(@NotNull File workspaceRoot, @Nullable String branchName) static @Nullable Stringtouch(@NotNull RepositoryDescriptor remoteRepository) static @Nullable Stringtouch(@NotNull RepositoryDescriptor remoteRepository, @NotNull String comment) static @Nullable Stringtouch(@NotNull RepositoryDescriptor remoteRepository, @NotNull Optional<String> branchName, @NotNull String pathToTouch, @NotNull String comment) static @Nullable Stringtouch(@NotNull RepositoryDescriptor remoteRepository, @NotNull Optional<String> branchName, @NotNull String pathToTouch, @NotNull String comment, @NotNull String gitUserName, @NotNull String gitUserEmail) static @Nullable StringtouchBranch(@NotNull RepositoryDescriptor remoteRepository, @NotNull String branchName, @NotNull String comment) static @Nullable StringtouchClonedWorkspace(@NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull String pathToTouch, @NotNull String comment) static @Nullable StringtouchClonedWorkspace(@NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull String pathToTouch, @NotNull String comment, @NotNull String gitUserName, @NotNull String gitUserEmail) static @Nullable StringtouchClonedWorkspaceWithToken(@NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull String pathToTouch, @NotNull String comment, @NotNull String token) static @Nullable StringtouchClonedWorkspaceWithToken(@NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull String pathToTouch, @NotNull String comment, @NotNull String gitUserName, @NotNull String gitUserEmail, @NotNull String token)
-
Field Details
-
GIT_USER_NAME
-
GIT_USER_EMAIL
-
DEFAULT_PATH_TO_TOUCH
- See Also:
-
-
Method Details
-
touch
@Nullable public static @Nullable String touch(@NotNull @NotNull RepositoryDescriptor remoteRepository, @NotNull @NotNull String comment) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
touchBranch
@Nullable public static @Nullable String touchBranch(@NotNull @NotNull RepositoryDescriptor remoteRepository, @NotNull @NotNull String branchName, @NotNull @NotNull String comment) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
touch
@Nullable public static @Nullable String touch(@NotNull @NotNull RepositoryDescriptor remoteRepository) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
touch
@Nullable public static @Nullable String touch(@NotNull @NotNull RepositoryDescriptor remoteRepository, @NotNull @NotNull Optional<String> branchName, @NotNull @NotNull String pathToTouch, @NotNull @NotNull String comment) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
touch
@Nullable public static @Nullable String touch(@NotNull @NotNull RepositoryDescriptor remoteRepository, @NotNull @NotNull Optional<String> branchName, @NotNull @NotNull String pathToTouch, @NotNull @NotNull String comment, @NotNull @NotNull String gitUserName, @NotNull @NotNull String gitUserEmail) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
touchClonedWorkspace
@Nullable public static @Nullable String touchClonedWorkspace(@NotNull @NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull @NotNull String pathToTouch, @NotNull @NotNull String comment) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
touchClonedWorkspace
@Nullable public static @Nullable String touchClonedWorkspace(@NotNull @NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull @NotNull String pathToTouch, @NotNull @NotNull String comment, @NotNull @NotNull String gitUserName, @NotNull @NotNull String gitUserEmail) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
touchClonedWorkspaceWithToken
@Nullable public static @Nullable String touchClonedWorkspaceWithToken(@NotNull @NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull @NotNull String pathToTouch, @NotNull @NotNull String comment, @NotNull @NotNull String token) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
touchClonedWorkspaceWithToken
@Nullable public static @Nullable String touchClonedWorkspaceWithToken(@NotNull @NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull @NotNull String pathToTouch, @NotNull @NotNull String comment, @NotNull @NotNull String gitUserName, @NotNull @NotNull String gitUserEmail, @NotNull @NotNull String token) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
readChangeSetId
@Nullable public static @Nullable String readChangeSetId(@NotNull @NotNull File workspaceRoot, @Nullable @Nullable String branchName) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
checkoutBranch
public static void checkoutBranch(@NotNull @NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull @NotNull String branchName) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
createBranch
public static void createBranch(@NotNull @NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull @NotNull String branchName) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
pushBranch
public static void pushBranch(@NotNull @NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull @NotNull String branchName) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
deleteBranch
public static void deleteBranch(@NotNull @NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull @NotNull String branchName) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
addFile
public static void addFile(@NotNull @NotNull GitRepositoryDescriptor repositoryDescriptor, @NotNull @NotNull File file, @NotNull @NotNull String commitMessage) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
commit
public static RepositoryHelper.CommandResult commit(Path cwd, String... someArgs) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
commit
public static RepositoryHelper.CommandResult commit(File cwd, String... someArgs) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
createTag
public static void createTag(@NotNull @NotNull GitRepositoryDescriptor clonedWorkspace, String tagName, boolean isLightweightTag, boolean push) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-