Class IvyBuildTrigger.DescriptorImpl
- All Implemented Interfaces:
PersistentDescriptor,Saveable,Loadable,OnMaster
- Enclosing class:
- IvyBuildTrigger
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self -
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) Configure the Descriptor from a GUI request.doCheckIvyConf(String value) Check that the Ivy configuration file exists.doCheckIvyFile(String value) Check that the workspace relative path to the ivy.xml file was entered and conforms to basic expectations.voiddoHandleExternalTrigger(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Simulate what would happen internally if a successful build occurred on an IvyBuildTrigger managed project.Implement the Descriptor's display name.booleanisApplicable(Class<? extends AbstractProject> jobType) Check if this Descriptor is applicable to the job type.booleanvoidsetConfigurations(IvyBuildTrigger.IvyConfiguration[] configurations) voidsetExtendedVersionMatching(boolean extendedVersionMatching) Methods inherited from class hudson.tasks.BuildStepDescriptor
filterMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.PersistentDescriptor
load
-
Constructor Details
-
DescriptorImpl
public DescriptorImpl()
-
-
Method Details
-
getConfigurations
- Returns:
- every existing configuration
-
setConfigurations
-
isExtendedVersionMatching
public boolean isExtendedVersionMatching()- Returns:
- true if extended version matching is being used.
-
setExtendedVersionMatching
@DataBoundSetter public void setExtendedVersionMatching(boolean extendedVersionMatching) -
getDisplayName
Implement the Descriptor's display name.- Overrides:
getDisplayNamein classDescriptor<Publisher>
-
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) Configure the Descriptor from a GUI request.- Overrides:
configurein classDescriptor<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
organdnamewhich respectively represent the Ivy module descriptor attributesorganisationandmodule. Optional request parameters that can be passed on the StaplerRequest2 includebranchandrevwhich respectively represent the Ivy module descriptor attributesbranchandrevision. 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 optionalrevorbranchis 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.BUILDpermission on a secured Jenkins instance.- Parameters:
req- The StaplerRequest2rsp- The StaplerResponse2- Throws:
IOException- IOException on the servlet calljakarta.servlet.ServletException- ServletException on the servlet call- See Also:
-
doCheckIvyConf
Check that the Ivy configuration file exists.- Parameters:
value- the file path
-
doCheckIvyFile
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
Check if this Descriptor is applicable to the job type. Currently on instances of Project are supported.- Specified by:
isApplicablein classBuildStepDescriptor<Publisher>- Parameters:
jobType- the AbstractProject type to be checked.- Returns:
- true iff the project type can apply this Descriptor
- See Also:
-