Class BundleNameInstanceTypeProvider

java.lang.Object
com.cloudbees.jenkins.support.BundleNameInstanceTypeProvider
All Implemented Interfaces:
ExtensionPoint
Direct Known Subclasses:
BundleNameInstanceTypeProvider.DEFAULT_STRATEGY

public abstract class BundleNameInstanceTypeProvider extends Object implements ExtensionPoint

Extension point allowing to customize the support bundle naming strategy.

It will work the following way:

  1. If an implementation of BundleNameInstanceTypeProvider is found, it will be used.
    WARNING: if many are found, then a warning will be issued, and the first extension found will be used.
  2. If not, then it will check for the presence of the SUPPORT_BUNDLE_NAMING_INSTANCE_SPEC_PROPERTY system property, and will use its value if provided.
  3. If not, then will fallback to the original behaviour, which is simply an empty String
See Also:
  • Constructor Details

    • BundleNameInstanceTypeProvider

      public BundleNameInstanceTypeProvider()
  • Method Details

    • getInstanceType

      @NonNull public abstract String getInstanceType()
      Returns the non-null and non empty (default value is empty) instance type to be used for generated support bundle names.

      Aims to provide informational data about the generated bundles.

      Will be used for file name generation, so avoid funky characters. Please ideally stay in [a-zA-Z-_.]. Also consider the file name length, you probably want to be defensive and not return crazily long strings. Something below 20 characters or so might sound reasonable.

      Returns:
      the instance type specification to be used for generated support bundles.