Class BuildResultScoringRule
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<ScoringRule>
-
- jp.ikedam.jenkins.plugins.scoringloadbalancer.ScoringRule
-
- jp.ikedam.jenkins.plugins.scoringloadbalancer.rules.BuildResultScoringRule
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<ScoringRule>
public class BuildResultScoringRule extends ScoringRule
A score keeper depends on build results on each nodes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BuildResultScoringRule.DescriptorImpl
Manages views forBuildResultScoringRule
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description BuildResultScoringRule(int numberOfBuilds, int scale, int scaleAdjustForOlder, int scoreForSuccess, int scoreForUnstable, int scoreForFailure)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNumberOfBuilds()
int
getScale()
int
getScaleAdjustForOlder()
int
getScoreForFailure()
int
getScoreForSuccess()
int
getScoreForUnstable()
boolean
updateScores(Queue.Task task, MappingWorksheet.WorkChunk wc, MappingWorksheet.Mapping m, ScoringLoadBalancer.NodesScore nodesScore)
Scores the nodes depending on build results on those nodes.-
Methods inherited from class jp.ikedam.jenkins.plugins.scoringloadbalancer.ScoringRule
all
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
BuildResultScoringRule
@DataBoundConstructor public BuildResultScoringRule(int numberOfBuilds, int scale, int scaleAdjustForOlder, int scoreForSuccess, int scoreForUnstable, int scoreForFailure)
Constructor. Initialized with values a user configured.- Parameters:
numberOfBuilds
-scale
-scaleAdjustForOlder
-scoreForSuccess
-scoreForUnstable
-scoreForFailure
-
-
-
Method Detail
-
getNumberOfBuilds
public int getNumberOfBuilds()
- Returns:
- the numberOfBuilds
-
getScale
public int getScale()
- Returns:
- the scale
-
getScaleAdjustForOlder
public int getScaleAdjustForOlder()
- Returns:
- the scaleAdjustForOlder
-
getScoreForSuccess
public int getScoreForSuccess()
- Returns:
- the scoreForSuccess
-
getScoreForUnstable
public int getScoreForUnstable()
- Returns:
- the scoreForUnstable
-
getScoreForFailure
public int getScoreForFailure()
- Returns:
- the scoreForFailure
-
updateScores
public boolean updateScores(Queue.Task task, MappingWorksheet.WorkChunk wc, MappingWorksheet.Mapping m, ScoringLoadBalancer.NodesScore nodesScore)
Scores the nodes depending on build results on those nodes.- Specified by:
updateScores
in classScoringRule
- Parameters:
task
-wc
-m
-nodesScore
-- Returns:
- whether to score with subsequent
ScoringRule
.
-
-