Skip to content
Permalink
Browse files

Merge pull request #236 from jglick/SCM-Job

[JENKINS-23365] Work in a general Job
  • Loading branch information
jglick committed Jun 16, 2014
2 parents 05630e8 + 268eec4 commit d83ff375786337368723879db113d0e8def2da00
Showing with 351 additions and 231 deletions.
  1. +13 −3 pom.xml
  2. +4 −8 src/main/java/hudson/plugins/git/GitChangeLogParser.java
  3. +1 −1 src/main/java/hudson/plugins/git/GitChangeSet.java
  4. +4 −3 src/main/java/hudson/plugins/git/GitChangeSetList.java
  5. +1 −1 src/main/java/hudson/plugins/git/GitPublisher.java
  6. +95 −49 src/main/java/hudson/plugins/git/GitSCM.java
  7. +32 −45 src/main/java/hudson/plugins/git/GitStatus.java
  8. +5 −6 src/main/java/hudson/plugins/git/GitTagAction.java
  9. +0 −27 src/main/java/hudson/plugins/git/MultipleScmResolver.java
  10. +85 −9 src/main/java/hudson/plugins/git/extensions/GitSCMExtension.java
  11. +3 −3 src/main/java/hudson/plugins/git/extensions/impl/CleanCheckout.java
  12. +2 −3 src/main/java/hudson/plugins/git/extensions/impl/CloneOption.java
  13. +4 −4 src/main/java/hudson/plugins/git/extensions/impl/PerBuildTag.java
  14. +4 −4 src/main/java/hudson/plugins/git/extensions/impl/PreBuildMerge.java
  15. +2 −2 src/main/java/hudson/plugins/git/extensions/impl/RelativeTargetDirectory.java
  16. +3 −3 src/main/java/hudson/plugins/git/extensions/impl/ScmName.java
  17. +4 −4 src/main/java/hudson/plugins/git/extensions/impl/SparseCheckoutPaths.java
  18. +3 −3 src/main/java/hudson/plugins/git/extensions/impl/SubmoduleOption.java
  19. +3 −3 src/main/java/hudson/plugins/git/extensions/impl/WipeWorkspace.java
  20. +5 −5 src/main/java/hudson/plugins/git/util/BuildChooserContext.java
  21. +1 −1 src/main/java/hudson/plugins/git/util/GitUtils.java
  22. +5 −5 src/main/resources/hudson/plugins/git/GitChangeSetList/index.jelly
  23. +6 −5 src/main/resources/hudson/plugins/git/GitSCM/project-changes.jelly
  24. +4 −4 src/main/resources/hudson/plugins/git/GitTagAction/tagForm.jelly
  25. +2 −1 src/test/java/hudson/plugins/git/GitChangeLogParserTest.java
  26. +6 −6 src/test/java/hudson/plugins/git/GitSCMTest.java
  27. +20 −11 src/test/java/hudson/plugins/git/MultipleSCMTest.java
  28. +5 −1 src/test/java/hudson/plugins/git/TestGitRepo.java
  29. +2 −1 src/test/java/hudson/plugins/git/browser/BitbucketWebTest.java
  30. +2 −1 src/test/java/hudson/plugins/git/browser/GitWebTest.java
  31. +15 −1 src/test/java/hudson/plugins/git/browser/GithubWebTest.java
  32. +2 −1 src/test/java/hudson/plugins/git/browser/GitoriousWebTest.java
  33. +2 −1 src/test/java/hudson/plugins/git/browser/KilnGitTest.java
  34. +2 −1 src/test/java/hudson/plugins/git/browser/RedmineWebTest.java
  35. +2 −4 src/test/java/hudson/plugins/git/browser/RhodeCodeTest.java
  36. +2 −1 src/test/java/hudson/plugins/git/browser/ViewGitWebTest.java
16 pom.xml
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.509</version>
<version>1.568</version>
</parent>

<licenses>
@@ -259,6 +259,16 @@
<artifactId>scm-api</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-project</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>mailer</artifactId>
<version>1.8</version>
</dependency>


<dependency>
@@ -302,8 +312,8 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>multiple-scms</artifactId>
<version>0.2</version>
<optional>true</optional>
<version>0.4-beta-1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
@@ -1,21 +1,17 @@
package hudson.plugins.git;

import hudson.model.AbstractBuild;
import hudson.model.Run;
import hudson.scm.ChangeLogParser;
import hudson.scm.RepositoryBrowser;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.LineIterator;
import org.xml.sax.SAXException;

import javax.annotation.Nonnull;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashSet;
@@ -39,7 +35,7 @@ public GitChangeLogParser(boolean authorOrCommitter) {
return parse(changelog.iterator());
}

public GitChangeSetList parse(AbstractBuild build, File changelogFile)
@Override public GitChangeSetList parse(Run build, RepositoryBrowser<?> browser, File changelogFile)
throws IOException, SAXException {

Set<GitChangeSet> r = new LinkedHashSet<GitChangeSet>();
@@ -48,7 +44,7 @@ public GitChangeSetList parse(AbstractBuild build, File changelogFile)
LineIterator lineIterator = null;
try {
lineIterator = FileUtils.lineIterator(changelogFile);
return new GitChangeSetList(build, parse(lineIterator));
return new GitChangeSetList(build, browser, parse(lineIterator));
} finally {
LineIterator.closeQuietly(lineIterator);
}
@@ -368,7 +368,7 @@ public String getComment() {
public String getCommentAnnotated() {
MarkupText markup = new MarkupText(getComment());
for (ChangeLogAnnotator a : ChangeLogAnnotator.all())
a.annotate(getParent().build,this,markup);
a.annotate(getParent().getRun(), this, markup);

return markup.toString(false);
}
@@ -1,7 +1,8 @@
package hudson.plugins.git;

import hudson.model.AbstractBuild;
import hudson.model.Run;
import hudson.scm.ChangeLogSet;
import hudson.scm.RepositoryBrowser;
import org.kohsuke.stapler.export.Exported;

import java.util.Collections;
@@ -16,8 +17,8 @@
public class GitChangeSetList extends ChangeLogSet<GitChangeSet> {
private final List<GitChangeSet> changeSets;

/*package*/ GitChangeSetList(AbstractBuild build, List<GitChangeSet> logs) {
super(build);
/*package*/ GitChangeSetList(Run build, RepositoryBrowser<?> browser, List<GitChangeSet> logs) {
super(build, browser);
Collections.reverse(logs); // put new things first
this.changeSets = Collections.unmodifiableList(logs);
for (GitChangeSet log : logs)
@@ -198,7 +198,7 @@ public boolean perform(AbstractBuild<?, ?> build,
else {
EnvVars environment = build.getEnvironment(listener);

final GitClient git = gitSCM.createClient(listener,environment,build);
final GitClient git = gitSCM.createClient(listener, environment, build, build.getWorkspace());

// If we're pushing the merge back...
if (pushMerge) {

0 comments on commit d83ff37

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