Skip to content
Permalink
Browse files

Merge pull request #21 from jenkinsci/bugfix/JENKINS-34425

Git parameter plugin skips one build number while populating tags
  • Loading branch information...
klimas7 committed Apr 26, 2016
2 parents aa854f5 + 769b81b commit 11074b527dde9fb7040fa4f588334d9eb246b48c
@@ -247,9 +247,8 @@ public int compareTo(GitParameterDefinition pd) {

for (RemoteConfig repository : git.getRepositories()) {
LOGGER.log(Level.INFO, "generateContents contenttype " + type + " RemoteConfig " + repository.getURIs());
GitClient newgit = getGitClient(project, git, environment);
for (URIish remoteURL : repository.getURIs()) {
GitClient newgit = git.createClient(TaskListener.NULL, environment, new Run(project) {
}, project.getSomeWorkspace());
FilePath wsDir = null;
if (project.getSomeBuildWithWorkspace() != null) {
wsDir = project.getSomeBuildWithWorkspace().getWorkspace();
@@ -345,6 +344,16 @@ public int compareTo(GitParameterDefinition pd) {
return paramList;
}

private GitClient getGitClient(final AbstractProject<?, ?> project, GitSCM git, EnvVars environment) throws IOException, InterruptedException {
int nextBuildNumber = project.getNextBuildNumber();

GitClient gitClient = git.createClient(TaskListener.NULL, environment, new Run(project) {
}, project.getSomeWorkspace());

project.updateNextBuildNumber(nextBuildNumber);
return gitClient;
}

public ArrayList<String> sortByName(Set<String> set) {

ArrayList<String> tags = new ArrayList<String>(set);

0 comments on commit 11074b5

Please sign in to comment.
You can’t perform that action at this time.