Class GitRepositoryHelper
- java.lang.Object
-
- com.atlassian.bamboo.testutils.vcs.git.GitRepositoryHelper
-
public class GitRepositoryHelper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_PATH_TO_TOUCHstatic StringGIT_USER_EMAILstatic StringGIT_USER_NAME
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddFile(@NotNull GitRepositoryDescriptor repositoryDescriptor, @NotNull File file, @NotNull String commitMessage)static voidcheckoutBranch(@NotNull GitRepositoryDescriptor clonedWorkspace, @NotNull String branchName)static RepositoryHelper.CommandResultcommit(File cwd, String... someArgs)static RepositoryHelper.CommandResultcommit(Path cwd, String... someArgs)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)
-
-
-
Field Detail
-
GIT_USER_NAME
public static final String GIT_USER_NAME
-
GIT_USER_EMAIL
public static final String GIT_USER_EMAIL
-
DEFAULT_PATH_TO_TOUCH
public static final String DEFAULT_PATH_TO_TOUCH
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
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
-
-