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.
  • 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:
      updateScores in class ScoringRule
      Parameters:
      task -
      wc -
      m -
      nodesScore -
      Returns:
      whether to score with subsequent ScoringRule.