public class PretestedIntegrationGitUtils extends Object
| Constructor and Description |
|---|
PretestedIntegrationGitUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
countCommits(org.eclipse.jgit.lib.ObjectId commitId,
org.jenkinsci.plugins.gitclient.GitClient client,
String expandedIntegrationBranch)
Counts the commits in the relevant BuildData
|
static hudson.plugins.git.util.BuildData |
findRelevantBuildData(hudson.model.Run<?,?> build,
PrintStream logger,
String repoName)
Retrieves the BuildData for the given build relevant to the Integration Repository.
|
static boolean |
isRelevant(hudson.plugins.git.Branch triggeredBranch,
String repoName) |
public static int countCommits(org.eclipse.jgit.lib.ObjectId commitId,
org.jenkinsci.plugins.gitclient.GitClient client,
String expandedIntegrationBranch)
throws IOException,
InterruptedException
commitId - The BuildData from the buildclient - The GitClientexpandedIntegrationBranch - the development branch we want to count commits onIOException - Unforseen IO issuesInterruptedException - Unforseen other issuespublic static hudson.plugins.git.util.BuildData findRelevantBuildData(hudson.model.Run<?,?> build,
PrintStream logger,
String repoName)
throws NothingToDoException,
UnsupportedConfigurationException
For a visualized example of several BuilData: See 'docs/More_than_1_gitBuild_data.png' TODO: We don't check that the integration branch complies with the branch specifier, or that commits are heads. See JENKINS-25542, JENKINS-25512, JENKINS-24909
build - The Buildlogger - The PrintStream logging objectrepoName - The repository nameNothingToDoException - If no relevant BuildData was found.UnsupportedConfigurationException - If multiple, ambiguous BuildDatas were found.public static boolean isRelevant(hudson.plugins.git.Branch triggeredBranch,
String repoName)
Copyright © 2016–2022. All rights reserved.