Interface BuildType

    • Method Detail

      • getRunningBuilds

        @NotNull
        java.util.List<? extends RunningBuild> getRunningBuilds​(@Nullable
                                                                User user)
        Returns all running builds of this build configuration including personal. If user is null all personal and non-personal builds of this build configuration are returned. If user is not null then personal builds of this user and non-personal builds are returned. List of running builds is sorted by build id in reverse order (most recent build first).
        Parameters:
        user - owner of personal builds
        Returns:
        list of running builds
      • getRunningBuilds

        @NotNull
        java.util.List<? extends RunningBuild> getRunningBuilds()
        Same as getRunningBuilds(null)
        Returns:
        list of running builds
      • isInQueue

        boolean isInQueue()
        Returns true if the configuration is queued at the moment
        Returns:
        true if configuration is queued, false otherwise.
      • getNumberQueued

        int getNumberQueued()
        Returns number of items for this build configurations currently waiting in queue
        Returns:
        number of queued builds of this configuration.
      • getStatus

        Status getStatus()
        Returns current status of the configuration.
        Returns:
        configuration status, which is calculated according to statuses of all the running builds (except personal) plus latest finished one.
      • getStatusDescriptor

        @NotNull
        BuildTypeStatusDescriptor getStatusDescriptor()
        Returns current status of the configuration with text description and status build.
        Returns:
        configuration status, which is calculated according to statuses of all the running builds (except personal) plus latest finished one.
      • getPendingChanges

        java.util.List<? extends VcsModification> getPendingChanges()
        Returns all changes already detected but not run.
        Returns:
        list of version control modifications, which are detected but no build with these modifications is started yet.
      • getModificationsSinceLastSuccessful

        java.util.List<? extends VcsModification> getModificationsSinceLastSuccessful()
        Returns all modifications made since last successfully finished build
        Returns:
        list of version control modifications, detected since last successful finished build has been finished
      • setResponsible

        void setResponsible​(@NotNull
                            User responsibleUser,
                            @Nullable
                            java.lang.String userComment,
                            @Nullable
                            User reporterUser)
        Called when a user takes a responsibility for the build type.

        Clients are encouraged to use BuildTypeResponsibilityFacade service when possible, as it provides more flexibility.

        Parameters:
        responsibleUser - responsible user. Not null
        userComment - user message. Will be shown in UI
        reporterUser - user who performs the action. May be null for automated operations
        Since:
        4.0.2
      • removeResponsible

        void removeResponsible​(boolean buildWasFixed,
                               @Nullable
                               User responsibleUser,
                               @Nullable
                               java.lang.String comment,
                               @Nullable
                               User whoPerformsTheAction)
        Removes responsible information , mark it is either 'fixed' or 'not fixed'.

        Clients are encouraged to use BuildTypeResponsibilityFacade service when possible, as it provides more flexibility.

        Parameters:
        buildWasFixed - if true, build configuration will be marked as fixed
        responsibleUser - User who performs the action. May be null for automated operations
        comment - user message. Will be shown in UI
        whoPerformsTheAction - user who performs the action. May be null for automated operations
        Since:
        4.0.2
      • getLastChangesSuccessfullyFinished

        @Nullable
        Build getLastChangesSuccessfullyFinished()
        Returns last successfully finished build in the configuration with last user changes, personal builds are not considered
        Returns:
        last successfully finished build in the configuration (excluding personal) or null if there are no successfully finished builds.
      • getLastChangesFinished

        @Nullable
        Build getLastChangesFinished()
        Returns last finished instance for the build configuration with last user changes (personal builds and canceled builds are excluded).
        Returns:
        last finished build instance or null if no any build has been finished yet.
      • getBuildByBuildNumber

        @Nullable
        Build getBuildByBuildNumber​(@NotNull
                                    java.lang.String buildNumber)
        Returns most recent build instance with specified build number. Generally, build number is unique but duplicates may happen if manually reset at build configuration page.
        Parameters:
        buildNumber - specified build number.
        Returns:
        most recent build instance with the given number.
      • findBuildRunnerByType

        @Nullable
        BuildRunnerDescriptor findBuildRunnerByType​(@NotNull
                                                    java.lang.String runnerType)
        Returns the first build runner of the specified type.
        Parameters:
        runnerType - type of the runner
        Returns:
        the first found runner or null
      • getBuildParameter

        java.lang.String getBuildParameter​(java.lang.String key)
        Returns build parameter by parameter key
        Parameters:
        key - parameter key
        Returns:
        build parameter by parameter key
      • getVcsRoots

        java.util.List<? extends VcsRoot> getVcsRoots()
        Returns all roots currently attached to this configuration
        Returns:
        collection of all attached vcs roots.
      • getBuildParameters

        @NotNull
        java.util.Map<java.lang.String,​java.lang.String> getBuildParameters()
        Returns the map of build parameters specified by user. For more details please see BuildTypeSettings.getBuildParameters() (server side).
        Returns:
        build parameters map
        Since:
        5.1
        See Also:
        getBuildParameter(String)
      • getParameters

        @NotNull
        java.util.Map<java.lang.String,​java.lang.String> getParameters()
        Returns map of build and configuration parameters.
        Returns:
        build and configuration parameters map
        Since:
        6.5