Interface Build

    • Method Detail

      • getStartDate

        @NotNull
        Date getStartDate()
        Returns timestamp when the build start command has been sent to an agent (server-time) or remove from queue time if start command has not been sent
        Returns:
        see above
      • getAgentName

        String getAgentName()
        Returns agent name where build is running or happened to run if finished.
        Returns:
        Agent name where build has been started on
      • getBuildId

        long getBuildId()
        Returns build id
        Returns:
        Unique build id
      • getStatusDescriptor

        StatusDescriptor getStatusDescriptor()
        Returns status descriptor of the build
        Returns:
        Descriptor of the current status of the build
      • getLogMessages

        List<String> getLogMessages​(int startFromIdx,
                                    int maxCount)
        Allows to get messages logged for the build
        Parameters:
        startFromIdx - index of the first message to load (zero based)
        maxCount - messages count limit.
        Returns:
        list of plain messages
      • getTestMessages

        List<TestInfo> getTestMessages​(int startFromIdx,
                                       int maxTestsToLoad)
        Retrieves information about tests failed in the build. Note that for running build currently executing test will be added to the list too.
        Parameters:
        startFromIdx - index/order number of the first test to load (zero based)
        maxTestsToLoad - indicates how many tests to load, -1 to load all
        Returns:
        list of plain messages
      • getCompilationErrorMessages

        List<String> getCompilationErrorMessages()
        Returns compilation error messages of this build
        Returns:
        list of plain messages
      • getBuildType

        @Nullable
        BuildType getBuildType()
        Returns build configuration this build belongs to.
        Returns:
        build configuration descriptor.
      • getBuildTypeId

        @NotNull
        String getBuildTypeId()
        Returns build configuration internal id
        Returns:
        ID of the configuration this build belongs to.
      • getBuildTypeExternalId

        @NotNull
        String getBuildTypeExternalId()
        Returns the build type external ID.

        If the external identifier does not exist (this might happen for a running build if the build type was deleted, and a new build type with same external id was created), a BuildPromotion#NOT_EXISTING_BUILD_TYPE_ID value is returned.

        Returns:
        build type external ID
        Since:
        8.0
      • getBuildTypeName

        @NotNull
        String getBuildTypeName()
        Returns name of the build configuration this build belongs to.
        Returns:
        name of the build configuration this build belongs to.
      • getFullName

        @NotNull
        String getFullName()
        Returns:
        full name of the build configuration this build belongs to, has form "project_name :: buildconfig_name"
      • getProjectId

        @Nullable
        String getProjectId()
        Returns internal id of the project this build belongs to. Same as getBuildType().getProjectId().
        Returns:
        internal id of the project this build belongs to. Same as getBuildType().getProjectId().
      • getProjectExternalId

        @Nullable
        String getProjectExternalId()
        Returns external id of the project this build belongs to. Same as getBuildType().getProjectId().
        Returns:
        external id of the project this build belongs to. Same as getBuildType().getProjectId().
        Since:
        8.0
      • getChanges

        List<? extends VcsModification> getChanges​(SelectPrevBuildPolicy policy,
                                                   boolean includeModificationsIfPreviousBuildIsAbsent)
        List of modifications detected in the version control since the previous build (selected according to the specified policy) Ordering: last detected modifications goes first in the list
        Parameters:
        policy - can be one of the two kinds:
        includeModificationsIfPreviousBuildIsAbsent - should the method return something if there's no previous build.
        Returns:
        list of modifications
      • getContainingChanges

        List<? extends VcsModification> getContainingChanges()
        Returns changes in this build. Same as getChanges(SelectPrevBuildPolicy.SINCE_LAST_BUILD, false) Ordering: last detected modifications goes first in the list
        Returns:
        changes in this build
      • isPersonal

        boolean isPersonal()
        Returns if this build has been run to test personal changes
        Returns:
        true is the build has been started as personal, and its changes were not committed to the VCS
      • getBuildStatus

        Status getBuildStatus()
        Returns current build status
        Returns:
        Current build status
      • isFinished

        boolean isFinished()
        Returns:
        true if the build was finished and was saved to the history
      • getBuildNumber

        @NotNull
        String getBuildNumber()
        Returns build number in the user defined format (unresolved parameters in build number will be replaced with '???').
        Returns:
        presentable build number
      • getFinishDate

        @Nullable
        Date getFinishDate()
        Returns finish timestamp for the build (server time) or null if it hasn't been finished yet.
        Returns:
        Date/time when the build has been finished, null if still running.
      • getCanceledInfo

        CanceledInfo getCanceledInfo()
        Returns info related to interrupted build. If build is finished, not interrupted, the value is null.
        Returns:
        info about canceled reason and canceler if build was actually interrupted, null otherwise.
      • getDuration

        long getDuration()
        Returns current build duration in seconds. The build duration is calculated as follows: - if build has been started on an agent (run command was successfully sent) then duration is calculated as finish time - start on agent time - otherwise duration is calculated as finish time - remove from queue time
        Returns:
        current build duration in seconds