-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from jenkinsci/build-history
rework of report build history creation
- Loading branch information
Showing
11 changed files
with
115 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/java/io/jenkins/plugins/reporter/model/NullReportHistory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package io.jenkins.plugins.reporter.model; | ||
|
||
|
||
import edu.hm.hafner.echarts.BuildResult; | ||
import edu.umd.cs.findbugs.annotations.NonNull; | ||
import hudson.model.Run; | ||
import io.jenkins.plugins.reporter.ReportAction; | ||
import io.jenkins.plugins.reporter.ReportResult; | ||
|
||
import java.util.Collections; | ||
import java.util.Iterator; | ||
import java.util.Optional; | ||
|
||
public class NullReportHistory implements History { | ||
@Override | ||
public Optional<ReportAction> getBaselineAction() { | ||
return Optional.empty(); | ||
} | ||
|
||
@Override | ||
public Optional<ReportResult> getBaselineResult() { | ||
return Optional.empty(); | ||
} | ||
|
||
@Override | ||
public Optional<ReportResult> getResult() { | ||
return Optional.empty(); | ||
} | ||
|
||
@Override | ||
public Optional<Run<?, ?>> getBuild() { | ||
return Optional.empty(); | ||
} | ||
|
||
@Override | ||
public Report getReport() { | ||
return new Report(); | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public Iterator<BuildResult<ReportResult>> iterator() { | ||
return Collections.emptyIterator(); | ||
} | ||
|
||
@Override | ||
public boolean hasMultipleResults() { | ||
return false; | ||
} | ||
} |
7 changes: 3 additions & 4 deletions
7
...nkins/plugins/reporter/ReportHistory.java → ...plugins/reporter/model/ReportHistory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/java/io/jenkins/plugins/reporter/model/ResultSelector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters