Class RetriggerAction

  • All Implemented Interfaces:
    Action, ModelObject

    public class RetriggerAction
    extends Object
    implements Action
    Action that retriggers one build with the same event parameters as the build this trigger is in.
    Author:
    Robert Sandell <robert.sandell@sonyericsson.com>
    • Constructor Detail

      • RetriggerAction

        public RetriggerAction​(TriggerContext context)
        Standard Constructor.
        Parameters:
        context - the original GerritCause's context.
      • RetriggerAction

        public RetriggerAction()
        Default constructor. Only use this if you are a serializer.
    • Method Detail

      • isVisible

        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        public boolean isVisible()
        Displays the retrigger option if permission is granted and the build is not already running.
        Returns:
        true if so.
      • doIndex

        @POST
        public void doIndex​(org.kohsuke.stapler.StaplerRequest request,
                            org.kohsuke.stapler.StaplerResponse response)
                     throws IOException
        Handles the request to re-trigger and redirects back to the page that called.
        Parameters:
        request - StaplerRequest the request.
        response - StaplerResponse the response handler.
        Throws:
        IOException - in case of Stapler issues