Package jenkins.scm

Interface RunWithSCM<JobT extends Job<JobT,​RunT>,​RunT extends Run<JobT,​RunT> & RunWithSCM<JobT,​RunT>>

  • All Known Implementing Classes:
    AbstractBuild, Build, FreeStyleBuild

    public interface RunWithSCM<JobT extends Job<JobT,​RunT>,​RunT extends Run<JobT,​RunT> & RunWithSCM<JobT,​RunT>>
    Allows a Run to provide SCM-related methods, such as providing changesets and culprits.
    • Method Detail

      • getCulpritIds

        Set<String> getCulpritIds()
        Gets the ids for all Users included in getChangeSets() for this item.
        A set of user IDs, or null if this was the first time the method was called or the build is still running for a RunWithSCM instance with no culprits.
      • shouldCalculateCulprits

        boolean shouldCalculateCulprits()
        Determines whether culprits should be recalcuated or the existing getCulpritIds() should be used instead.
        True if culprits should be recalcuated, false otherwise.
      • getCulprits

        default Set<User> getCulprits()
        List of users who committed a change since the last non-broken build till now.

        This list at least always include people who made changes in this build, but if the previous build was a failure it also includes the culprit list from there.

        Missing Users will be created on-demand.

        can be empty but never null.
      • calculateCulprits

        default Set<User> calculateCulprits()
        Method used for actually calculating the culprits from scratch. Called by getCulprits() and overrides of getCulprits(). Does not persist culprits information.
        a non-null Set of Users associated with this item.
      • hasParticipant

        default boolean hasParticipant​(User user)
        Returns true if this user has made a commit to this build.