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>
A score keeper depends on build results on each nodes.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
ConstructorsConstructorDescriptionBuildResultScoringRule(int numberOfBuilds, int scale, int scaleAdjustForOlder, int scoreForSuccess, int scoreForUnstable, int scoreForFailure) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintintgetScale()intintintintbooleanupdateScores(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
allMethods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
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 Details
-
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:
updateScoresin classScoringRule- Parameters:
task-wc-m-nodesScore-- Returns:
- whether to score with subsequent
ScoringRule.
-