Package hudson.ivy

Class IvyBuildTrigger.DescriptorImpl

All Implemented Interfaces:
PersistentDescriptor, Saveable, Loadable, OnMaster
Enclosing class:
IvyBuildTrigger

public static final class IvyBuildTrigger.DescriptorImpl extends BuildStepDescriptor<Publisher> implements PersistentDescriptor
The descriptor implementation of this trigger
  • Constructor Details

    • DescriptorImpl

      public DescriptorImpl()
  • Method Details

    • getConfigurations

      public IvyBuildTrigger.IvyConfiguration[] getConfigurations()
      Returns:
      every existing configuration
    • setConfigurations

      @DataBoundSetter public void setConfigurations(IvyBuildTrigger.IvyConfiguration[] configurations)
    • isExtendedVersionMatching

      public boolean isExtendedVersionMatching()
      Returns:
      true if extended version matching is being used.
    • setExtendedVersionMatching

      @DataBoundSetter public void setExtendedVersionMatching(boolean extendedVersionMatching)
    • getDisplayName

      public String getDisplayName()
      Implement the Descriptor's display name.
      Overrides:
      getDisplayName in class Descriptor<Publisher>
    • configure

      public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json)
      Configure the Descriptor from a GUI request.
      Overrides:
      configure in class Descriptor<Publisher>
    • doHandleExternalTrigger

      public void doHandleExternalTrigger(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException
      Simulate what would happen internally if a successful build occurred on an IvyBuildTrigger managed project. This provides a hook to start builds on downstream projects if a triggering event outside of Jenkins occurred. One such triggering event could be publish of a non-integration (milestone/release) build of the IvyBuildTrigger managed project code to the Ivy repository that is visible to your build system.

      The StaplerRequest2 parameter must include request parameters org and name which respectively represent the Ivy module descriptor attributes organisation and module. Optional request parameters that can be passed on the StaplerRequest2 include branch and rev which respectively represent the Ivy module descriptor attributes branch and revision. These values are used to match against the ModuleDescriptor of Jenkins projects using the IvyBuildTrigger. In the case that more than one project matches, it is the first match that will win, and only that project will have its downstream dependencies scheduled for builds. Therefore the caller is wise to provide the most information in the request to ensure the best possible match. If the trigger descriptor is set to use extended version matching, then at least one of the optional rev or branch is required on the request.

      Note this event trigger does not actually build the matched project in Jenkins. It just schedules builds on downstream dependent projects. Successfully executing this event trigger requires global Item.BUILD permission on a secured Jenkins instance.

      Parameters:
      req - The StaplerRequest2
      rsp - The StaplerResponse2
      Throws:
      IOException - IOException on the servlet call
      jakarta.servlet.ServletException - ServletException on the servlet call
      See Also:
    • doCheckIvyConf

      public FormValidation doCheckIvyConf(@QueryParameter String value)
      Check that the Ivy configuration file exists.
      Parameters:
      value - the file path
    • doCheckIvyFile

      public FormValidation doCheckIvyFile(@QueryParameter String value)
      Check that the workspace relative path to the ivy.xml file was entered and conforms to basic expectations. This code cannot check for file existence since the file never exists for new projects that need to check out the ivy file from source control. Under this condition the validator would always fail for first time configuration which can be confusing. The Ivy file might also be on a remote slave making checking for existence at this level more difficult.
      Parameters:
      value - the relative path
    • isApplicable

      public boolean isApplicable(Class<? extends AbstractProject> jobType)
      Check if this Descriptor is applicable to the job type. Currently on instances of Project are supported.
      Specified by:
      isApplicable in class BuildStepDescriptor<Publisher>
      Parameters:
      jobType - the AbstractProject type to be checked.
      Returns:
      true iff the project type can apply this Descriptor
      See Also: