Package io.forgeai.jenkins.actions
Class ForgeAIBuildAction
java.lang.Object
io.forgeai.jenkins.actions.ForgeAIBuildAction
- All Implemented Interfaces:
Action,ModelObject,RunAction2
The result of a
forgeAI step, kept with the build. It renders the analysis as a page of the build
(forgeai-analysis/), styled by Jenkins itself, and feeds the score trend on the job page.
When a build calls forgeAI more than once, the result of the last call is kept.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOne analyzer's line in the analyzer table.static final classOne finding, with the analyzer that reported it. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionForgeAIBuildAction(List<AnalysisResult> results, List<String> failedAnalyzers, String analysisScope, int filesAnalyzed, int filesSkipped, boolean gateEnabled, int threshold) -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringband(double score) doubleAverage of the analyzer scores, or 0 when every analyzer failed.longintintEvery finding, most severe first, in analyzer order within a severity.PASSED, FAILED or OFF, matching what the step did with the build.longRun<?, ?> getRun()intlongCSS modifier for the verdict: ship, caution, hold, block, or none.booleanbooleanisScored()False when every analyzer failed, so there is no score to show.voidonAttached(Run<?, ?> r) void
-
Field Details
-
URL_NAME
- See Also:
-
-
Constructor Details
-
ForgeAIBuildAction
public ForgeAIBuildAction(List<AnalysisResult> results, List<String> failedAnalyzers, String analysisScope, int filesAnalyzed, int filesSkipped, boolean gateEnabled, int threshold)
-
-
Method Details
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
onAttached
- Specified by:
onAttachedin interfaceRunAction2
-
onLoad
- Specified by:
onLoadin interfaceRunAction2
-
getRun
-
isScored
public boolean isScored()False when every analyzer failed, so there is no score to show. -
getCompositeScore
public double getCompositeScore()Average of the analyzer scores, or 0 when every analyzer failed. -
getCompositeScoreText
-
getVerdict
-
getVerdictKey
CSS modifier for the verdict: ship, caution, hold, block, or none. -
band
-
getTotalFindings
public long getTotalFindings() -
getCriticalCount
public long getCriticalCount() -
getHighCount
public long getHighCount() -
getResults
-
getFailedAnalyzers
-
getFailedAnalyzersText
-
getAnalysisScope
-
getFilesAnalyzed
public int getFilesAnalyzed() -
getFilesSkipped
public int getFilesSkipped() -
isGateEnabled
public boolean isGateEnabled() -
getThreshold
public int getThreshold() -
getScopeText
-
getGateStatus
PASSED, FAILED or OFF, matching what the step did with the build. -
getGateText
-
getAnalyzerRows
-
getFindingRows
Every finding, most severe first, in analyzer order within a severity.
-