Skip to content

Commit

Permalink
Fixed coverage history to look for SUCCESS or UNSTABLE builds
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSVector committed Mar 22, 2023
1 parent 852a73b commit 9955573
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ None

## Change Log

### Version 0.22 (19 Feb 2023)
### Version 0.22 (22 Mar 2023)
- Bumped dashboard-view from 2.16 to 2.18.1
- Updated minimum Jenkins version to 2.361
- Upgraded to Java 11
- Upgraded TimeLocal from org.joda.time to java.time
- Updated dependencies
- Upgraded from findbugs to spotbugs
- Cleaned up bugs found with spotbugs
- Fixed coverage history to look for SUCCESS or UNSTABLE builds.

### Version 0.21 (31 Jan 2023)
- Fix to support jobs configured with older coverage plugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,22 @@ public VectorCASTBuildAction getLastResult() {

/**
* Gets the most recent {@link VectorCASTBuildAction} object.
* @return last build result
* @return last SUCCSSS or UNSTABLE build result
*/
public VectorCASTBuildAction getPreviousNotFailedBuild() {
Boolean skipFirst = true;
VectorCASTBuildAction r;
for( Run<?, ?> b = project.getLastBuild(); b!=null; b=b.getPreviousBuild()) {
if (skipFirst) {
skipFirst = false;
continue;
}
if(b.getResult()== Result.FAILURE)
// Return only SUCCSSS or UNSTABLE builds
if(b.getResult() == Result.SUCCESS || b.getResult() == Result.UNSTABLE)
r = b.getAction(VectorCASTBuildAction.class);
else
continue;
VectorCASTBuildAction r = b.getAction(VectorCASTBuildAction.class);

if(r!=null)
return r;
}
Expand Down

0 comments on commit 9955573

Please sign in to comment.