Class ApprovalRebuildValidator

java.lang.Object
com.sonyericsson.rebuild.RebuildValidator
io.jenkins.plugins.batchcontrol.policy.ApprovalRebuildValidator
All Implemented Interfaces:
ExtensionPoint, Serializable

@Extension(optional=true) @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class ApprovalRebuildValidator extends com.sonyericsson.rebuild.RebuildValidator
e2e-03 DEF-25 (SPEC item 6 and section 6 usability): the rebuild plugin's Rebuild and Rebuild Last entries are not offered on builds of a job whose manual runs need an approved run request (RunRequestService.requiresApprovalToRun(hudson.model.Job<?, ?>)), because the queue gate refuses every such rebuild. The rebuild plugin is an optional dependency; without it this extension is not loaded.

Only page views are affected: while a page is rendered (any request but one to the rebuild action itself, FD-16) the validator withholds the rebuild action, so no page links it. The build's rebuild/ endpoint still reaches the action, so a direct call is refused by the queue gate with its explanation and recorded (SPEC item 6, e2e-03 DEF-03), and code outside a web request sees the action as before. Context menus are not withheld from (e2e-07 DEF-06): the rebuild plugin would otherwise put an entry with a null URL into them. With run control off, or on a job that does not require approval, nothing changes.

See Also:
  • Constructor Details

    • ApprovalRebuildValidator

      public ApprovalRebuildValidator()
  • Method Details

    • isApplicable

      public boolean isApplicable(Run build)
      Overrides:
      isApplicable in class com.sonyericsson.rebuild.RebuildValidator