Skip to content
Permalink
Browse files

[JENKINS-26100] Switch buildEnvVars and others to Run

  • Loading branch information...
abayer committed May 1, 2017
1 parent fd68967 commit 47f738c54c6e8f5ead678aacfda1faa1d7433db8
Showing with 7 additions and 6 deletions.
  1. +3 −2 pom.xml
  2. +4 −4 src/main/java/hudson/plugins/git/GitSCM.java
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.26</version>
<version>2.27-20170501.155323-2</version> <!-- TODO: Switch to 2.27 once https://github.com/jenkinsci/plugin-pom/pull/59 is released -->
<relativePath />
</parent>

@@ -24,7 +24,8 @@
<inceptionYear>2007</inceptionYear>

<properties>
<jenkins.version>1.625.3</jenkins.version>
<jenkins-core.version>2.58-20170501.171905-3</jenkins-core.version> <!-- TODO: Switch to release once https://github.com/jenkinsci/jenkins/pull/2730 is merged and released -->
<jenkins-war.version>2.58-20170501.171927-3</jenkins-war.version> <!-- TODO: Switch to release once https://github.com/jenkinsci/jenkins/pull/2730 is merged and released -->
<java.level>7</java.level>
<no-test-jar>false</no-test-jar>
<concurrency>1C</concurrency>
@@ -1255,8 +1255,8 @@ private void computeChangeLog(GitClient git, Revision revToBuild, TaskListener l
}
}

public void buildEnvVars(AbstractBuild<?, ?> build, java.util.Map<String, String> env) {
super.buildEnvVars(build, env);
@Override
public void buildEnvVars(Run<?, ?> build, java.util.Map<String, String> env) {
Revision rev = fixNull(getBuildData(build)).getLastBuiltRevision();
if (rev!=null) {
Branch branch = Iterables.getFirst(rev.getBranches(), null);
@@ -1319,7 +1319,7 @@ private String getBranchName(Branch branch)
return name;
}

private String getLastBuiltCommitOfBranch(AbstractBuild<?, ?> build, Branch branch) {
private String getLastBuiltCommitOfBranch(Run<?, ?> build, Branch branch) {
String prevCommit = null;
if (build.getPreviousBuiltBuild() != null) {
final Build lastBuildOfBranch = fixNull(getBuildData(build.getPreviousBuiltBuild())).getLastBuildOfBranch(branch.getName());
@@ -1333,7 +1333,7 @@ private String getLastBuiltCommitOfBranch(AbstractBuild<?, ?> build, Branch bran
return prevCommit;
}

private String getLastSuccessfulBuiltCommitOfBranch(AbstractBuild<?, ?> build, Branch branch) {
private String getLastSuccessfulBuiltCommitOfBranch(Run<?, ?> build, Branch branch) {
String prevCommit = null;
if (build.getPreviousSuccessfulBuild() != null) {
final Build lastSuccessfulBuildOfBranch = fixNull(getBuildData(build.getPreviousSuccessfulBuild())).getLastBuildOfBranch(branch.getName());

0 comments on commit 47f738c

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