Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-26100] Switch buildEnvVars and others to Run
  • Loading branch information
abayer committed May 1, 2017
1 parent fd68967 commit 47f738c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions pom.xml
Expand Up @@ -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>

Expand All @@ -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>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/hudson/plugins/git/GitSCM.java
Expand Up @@ -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);
Expand Down Expand Up @@ -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());
Expand All @@ -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());
Expand Down

0 comments on commit 47f738c

Please sign in to comment.