Interface BitbucketBuildStatusCustomizer

All Superinterfaces:
ExtensionPoint

public interface BitbucketBuildStatusCustomizer extends ExtensionPoint
  • Nested Class Summary

    Nested classes/interfaces inherited from interface hudson.ExtensionPoint

    ExtensionPoint.LegacyInstancesAreScopedToHudson
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    apply(jenkins.scm.api.trait.SCMSourceTrait trait)
    Trait instance associate to a SCMSource where gather extra configuration options.
    void
    customize(Run<?,?> build, BitbucketBuildStatus buildStatus)
    Apply some customisations to a given build status.
    boolean
    Returns if this implementation supports the given endpoint type.
    default Collection<Class<? extends jenkins.scm.api.trait.SCMSourceTrait>>
    A list of traits class that this manager supports to obtain additional configuration options.
    default void
    withTraits(List<jenkins.scm.api.trait.SCMSourceTrait> traits)
    Convenient method to apply only supported traits to this customiser.
  • Method Details

    • isApplicable

      boolean isApplicable(@NonNull EndpointType type)
      Returns if this implementation supports the given endpoint type.
      Parameters:
      type - of the endpoint
      Returns:
      true if this implementation can manage API for this endpoint, false otherwise.
    • apply

      default void apply(jenkins.scm.api.trait.SCMSourceTrait trait)
      Trait instance associate to a SCMSource where gather extra configuration options.

      Each BitbucketBuildStatusCustomizer that would obtain additional configuration options per project must provide an own specific trait implementation.

      Parameters:
      trait - to apply
    • supportedTraits

      default Collection<Class<? extends jenkins.scm.api.trait.SCMSourceTrait>> supportedTraits()
      A list of traits class that this manager supports to obtain additional configuration options.
      Returns:
      a list of SCMSourceTrait classes.
    • customize

      @Restricted(org.kohsuke.accmod.restrictions.Beta.class) @CheckForNull void customize(Run<?,?> build, @NonNull BitbucketBuildStatus buildStatus)
      Apply some customisations to a given build status.

      Any additional information must be supplied in the BitbucketBuildStatus.getOptionalData(). For tracing reason any changes if applied by the customizer it will be logged in the console.

      Parameters:
      buildStatus - to customise
      build - current Run job.
    • withTraits

      default void withTraits(List<jenkins.scm.api.trait.SCMSourceTrait> traits)
      Convenient method to apply only supported traits to this customiser.
      Parameters:
      traits - to apply if supported too