Class SecuredRunningBuild

    • Method Detail

      • stop

        public void stop​(User user,
                         String comment)
        Description copied from interface: SRunningBuild
        Stops the build. If this is a user action, user who performs this action must be specified. If build is stopped without user it will be considered crashed and can be re-added into the queue.
        Specified by:
        stop in interface SRunningBuild
        Overrides:
        stop in class BaseRunningBuild
        Parameters:
        user - user who stopped build or null
        comment - comment for the action or null
      • stop

        public void stop​(@NotNull
                         RunningBuildState interruptedState,
                         @Nullable
                         User user,
                         @NotNull
                         String comment,
                         boolean reAdd2Queue)
        Specified by:
        stop in interface RunningBuildEx
        Overrides:
        stop in class RunningBuildImpl
        Parameters:
        interruptedState - how to interrupt the build, should have interrupted status
        user - optional user who stops the build
        comment - comment for build interruption
        reAdd2Queue - if true, the build will be re-added to queue with the same build promotion (to the end of the queue)
      • finish

        public void finish​(@NotNull
                           Date finishDate)
        Description copied from interface: SRunningBuild
        Finalizes all build related activities and finishes the build. Build must be finished on agent. Takes no effect for already finished or interrupted builds.
        Specified by:
        finish in interface SRunningBuild
        Overrides:
        finish in class RunningBuildImpl
        Parameters:
        finishDate - finish date
      • setTags

        public void setTags​(List<String> tags)
        Description copied from interface: SBuild
        Sets public tags for this build
        Specified by:
        setTags in interface SBuild
        Overrides:
        setTags in class BaseBuild
        Parameters:
        tags - tags to set
      • setTags

        public void setTags​(User user,
                            List<String> tags)
        Description copied from interface: SBuild
        Sets public tags for this build
        Specified by:
        setTags in interface SBuild
        Overrides:
        setTags in class BaseBuild
        Parameters:
        user - user who set tags, this user is not treated as tag owner - the user from security context, doesn't correspond to tags owner
        tags - tag labels to set
      • setBuildComment

        public void setBuildComment​(@Nullable
                                    User user,
                                    @Nullable
                                    String comment)
        Description copied from interface: SBuild
        Sets the comment for the build
        Specified by:
        setBuildComment in interface SBuild
        Overrides:
        setBuildComment in class BaseBuild
        Parameters:
        user - user who sets the comment
        comment - text of the comment
      • setBuildNumber

        public void setBuildNumber​(@NotNull
                                   String newBuildNumber)
        Description copied from interface: SRunningBuild
        Set new value for this build build number instead of current one. If newBuildNumber has pattern {build.number}, it is replaced with the current build number
        Specified by:
        setBuildNumber in interface SRunningBuild
        Overrides:
        setBuildNumber in class RunningBuildImpl
        Parameters:
        newBuildNumber - new value for this build build number
      • addUserBuildProblem

        public BuildProblemData addUserBuildProblem​(@NotNull
                                                    SUser user,
                                                    @NotNull
                                                    String problemDescription)
        Description copied from interface: SBuild
        Adds user provided build problem to the build. Currently build problem causes build failure. Adding user provided problem always overrides previously added one
        Specified by:
        addUserBuildProblem in interface SBuild
        Overrides:
        addUserBuildProblem in class BaseBuild
        Parameters:
        user - user that will be used in audit
        Returns:
        added build problem
      • muteBuildProblems

        public void muteBuildProblems​(@NotNull
                                      SUser user,
                                      boolean muteIfTrue,
                                      @NotNull
                                      String comment)
        Description copied from interface: SBuild
        Makes all existing build problems enabled or disabled
        Specified by:
        muteBuildProblems in interface SBuild
        Overrides:
        muteBuildProblems in class BaseBuild
        Parameters:
        user - user that will be used in audit
        muteIfTrue - pass true to make build successful, false to make existing problems visible again
        comment - comment for audit
      • deleteBuildProblem

        public void deleteBuildProblem​(@NotNull
                                       SUser user,
                                       @NotNull
                                       String identity,
                                       @Nullable
                                       String comment)
        Description copied from interface: BuildEx
        Deletes build problem Deleting build problem may change build status to SUCCESS
        Specified by:
        deleteBuildProblem in interface BuildEx
        Overrides:
        deleteBuildProblem in class BaseBuild
        Parameters:
        user - user that will be used in audit
        identity - identiry of build problem to be removed
        comment - comment for audit