Class InputStepBridge

java.lang.Object
io.jenkins.plugins.interactiveinput.bridge.InputStepBridge

@Extension public class InputStepBridge extends Object
Opt-in bridge that surfaces built-in input steps in the notification bell (§3.1 S5, §8.7).

When unclassified.interactiveInput.features.inputStepBridge is on, sync() (invoked by the SLA ticker) reconciles the QuestionStore with the live set of pending InputStepExecutions: each pending native input is mirrored as a bridged Question, and a transient resolver is (re)attached every tick so it survives a restart. Answering a mirror through our modal or REST forwards to the native step (InputStepExecution.proceed(java.util.Map<java.lang.String, java.lang.Object>)/InputStepExecution.doAbort()); if the user instead answers via the built-in UI, the native input settles, disappears from its InputAction, and the next sync drops the now-orphaned mirror.

The mirror faithfully reproduces the native "proceed with no parameters" contract, including the optional submitterParameter (populated with the answering user's id). Native inputs that declare parameters are surfaced read-only with a deep link to the build's input form (answering parameterised inputs in-modal is a v0.2 item, §12).

Builds that already use input see no behavioural change — they simply also appear in the bell. The bridge is off by default and does nothing until an operator opts in.

  • Field Details

    • PROCEED_CHOICE_ID

      public static final String PROCEED_CHOICE_ID
      Sentinel choice offered for parameterless native inputs; means "resume the input".
      See Also:
  • Constructor Details

    • InputStepBridge

      public InputStepBridge()
  • Method Details

    • get

      @NonNull public static InputStepBridge get()
    • sync

      public void sync()
      Reconcile every job's bridged mirrors with the live set of pending native input steps. Invoked by the SLA ticker every 30s; equivalent to reconcile(null). Safe to call repeatedly; it is a no-op (beyond dropping stale mirrors) when the feature is off.
    • reconcile

      public void reconcile(@CheckForNull String jobScope)
      Reconcile bridged mirrors with the live native input state.

      When jobScope is null every job is scanned (the ticker path). When it names a job, only that job is scanned and only that job's bridged mirrors are reconciled — this is the read path: GET /questions?job=<name> calls it so a pipeline's surfaces self-heal within one poll (≤15s) instead of waiting up to 30s for the next ticker tick. That matters when a native input is answered through the built-in console/stage-view UI: our mirror stays WAITING until the underlying InputStepExecution disappears from its InputAction and we drop it here.

      Parameters:
      jobScope - full name of the single job to reconcile, or null for all jobs