Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-26270] Added "lastCompletedBuild" to permalinks.
  • Loading branch information
ikedam committed Jan 3, 2015
1 parent 35f174d commit ca56131
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions core/src/main/java/hudson/model/PermalinkProjectAction.java
Expand Up @@ -178,6 +178,19 @@ public boolean apply(Run<?, ?> run) {
return !run.isBuilding() && run.getResult()!=Result.SUCCESS;
}
};
public static final Permalink LAST_COMPLETED_BUILD = new Permalink() {
public String getDisplayName() {
return Messages.Permalink_LastCompletedBuild();
}

public String getId() {
return "lastCompletedBuild";
}

public Run<?,?> resolve(Job<?,?> job) {
return job.getLastCompletedBuild();
}
};

static {
BUILTIN.add(LAST_BUILD);
Expand All @@ -186,6 +199,7 @@ public boolean apply(Run<?, ?> run) {
BUILTIN.add(LAST_FAILED_BUILD);
BUILTIN.add(LAST_UNSTABLE_BUILD);
BUILTIN.add(LAST_UNSUCCESSFUL_BUILD);
BUILTIN.add(LAST_COMPLETED_BUILD);
}
}
}
1 change: 1 addition & 0 deletions core/src/main/resources/hudson/model/Messages.properties
Expand Up @@ -299,6 +299,7 @@ Permalink.LastUnstableBuild=Last unstable build
Permalink.LastUnsuccessfulBuild=Last unsuccessful build
Permalink.LastSuccessfulBuild=Last successful build
Permalink.LastFailedBuild=Last failed build
Permalink.LastCompletedBuild=Last completed build

ParameterAction.DisplayName=Parameters
ParametersDefinitionProperty.DisplayName=Parameters
Expand Down
Expand Up @@ -272,6 +272,7 @@ Permalink.LastUnstableBuild=\u6700\u65b0\u306e\u4e0d\u5b89\u5b9a\u30d3\u30eb\u30
Permalink.LastUnsuccessfulBuild=\u6700\u65b0\u306e\u4e0d\u6210\u529f\u30d3\u30eb\u30c9
Permalink.LastSuccessfulBuild=\u6700\u65b0\u306e\u6210\u529f\u30d3\u30eb\u30c9
Permalink.LastFailedBuild=\u6700\u65b0\u306e\u5931\u6557\u30d3\u30eb\u30c9
Permalink.LastCompletedBuild=\u6700\u65b0\u306e\u5b8c\u4e86\u30d3\u30eb\u30c9


ParameterAction.DisplayName=\u30d1\u30e9\u30e1\u30fc\u30bf
Expand Down

0 comments on commit ca56131

Please sign in to comment.