Class SecuredFinishedBuildImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.BaseBuild
-
- jetbrains.buildServer.serverSide.impl.FinishedBuildImpl
-
- jetbrains.buildServer.serverSide.impl.auth.SecuredFinishedBuildImpl
-
- All Implemented Interfaces:
Build
,BuildEx
,BuildPromotionOwner
,FinishedBuildEx
,ParametersSupport
,SBuild
,SFinishedBuild
public class SecuredFinishedBuildImpl extends FinishedBuildImpl
Created 24.04.13 15:54
-
-
Field Summary
-
Fields inherited from class jetbrains.buildServer.serverSide.impl.BaseBuild
myBuildId, myContext, myStatsCallCounter, REMOTE_ARTIFACTS_PREFIX
-
-
Constructor Summary
Constructors Constructor Description SecuredFinishedBuildImpl(long buildId, long buildPromotionId, String buildTypeId, String agentName, int agentTypeId, Date buildStartTimeServer, Date buildStartTimeAgent, Date buildFinishTimeServer, Status buildStatus, String finalStatusText, String buildNumber, boolean pin, boolean personal, CanceledInfo canceledInfo, String requestor, String buildDescription, BuildPromotionEx buildPromotion, BuildContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BuildProblemData
addUserBuildProblem(SUser user, String problemDescription)
Adds user provided build problem to the build.void
deleteBuildProblem(SUser user, String identity, String comment)
Deletes build problem Deleting build problem may change build status to SUCCESSBuildAgentEx
getAgent()
DepParametersMemoryOptimizedMap
getBuildFinishParameters()
This method returns build parameters (env, config, system) that were on build agent at the end of this build.DepParametersMemoryOptimizedMap
getBuildStartParameters()
This method returns build parameters (env, config, system) that were on build agent before build runners are called in the build.SortedMap<BuildTypeEx,BuildPromotionEx>
getDeploymentStatus()
void
muteBuildProblems(SUser user, boolean muteIfTrue, String comment)
Makes all existing build problems enabled or disabledvoid
setBuildComment(User user, String comment)
Sets the comment for the buildvoid
setLabel(String labelValue, List<VcsRootInstance> rootsToLabel)
Sets a label on files in VCS repository used by this build in the specified VCS rootsvoid
setPinned(boolean pinned, User user, String comment)
Sets pin status for this build.void
setTags(List<String> tags)
Sets public tags for this buildvoid
setTags(User user, List<String> tags)
Sets public tags for this buildvoid
updatePinInfo()
Reload pin status from the database-
Methods inherited from class jetbrains.buildServer.serverSide.impl.FinishedBuildImpl
beforeDelete, buildEvictedFromCache, equals, getAgentName, getBuildCounter, getBuildDescription, getBuildLog, getBuildLogIfInitialized, getBuildNumber, getBuildPromotion, getBuildStatistics, getBuildStatus, getBuildType, getBuildTypeExternalId, getBuildTypeId, getCachedShortStatistics, getCanceledInfo, getFinishDate, getFinishOnAgentDate, getPinComment, getProjectExternalId, getProjectId, getRawBuildNumber, getStatusDescriptor, hashCode, isAgentLessBuild, isCompositeBuild, isDetachedFromAgent, isFinished, isPersonal, isPinned, notifyOnBuildProblemsChanged, resetFullStatisticsCache, resetShortStatisticsCache, setLabel, setPinned, setStatusText, toString, updateStatusText
-
Methods inherited from class jetbrains.buildServer.serverSide.impl.BaseBuild
addBuildProblem, buildProblemsChanged, convertToAgentTime, convertToServerTime, createShortStatistics, doGetBuildFinishParameters, doGetBuildStartParameters, getArtifactDependencies, getArtifacts, getArtifactsDirectory, getAuditLogFactory, getAuditLogProvider, getBranch, getBuildComment, getBuildContext, getBuildFeaturesOfType, getBuildId, getBuildNumberParameters, getBuildNumberWithoutRefs, getBuildOwnParameters, getBuildProblems, getBuildTypeName, getChanges, getClientStartDate, getClientTimeZone, getCommitters, getCompilationErrorMessages, getContainingChanges, getCustomDataStorage, getCustomDataStorageIdsByPrefix, getDetachFromAgentReceivedTimestamp, getDownloadedArtifacts, getDuration, getDurationOnAgent, getFailureReasons, getFileContent, getFirstInternalError, getFirstInternalErrorMessage, getFullName, getFullStatistics, getId, getLabels, getLogMessages, getOwner, getParametersProvider, getPreviousFinished, getProvidedArtifacts, getQueuedDate, getRecentlyFinishedBuild, getRelatedIssues, getRemoteArtifacts, getRemoteArtifactsByType, getRevisions, getSequenceBuild, getServerStartDate, getSettingsDigestFile, getSettingsDigestFromFile, getShortStatistics, getStartDate, getStatisticValue, getStatisticValues, getStatus, getTags, getTemporaryCustomDataStorage, getTestMessages, getTriggeredBy, getValueResolver, getValueResolver, getValueResolver, getVariablesProvider, getVcsRootEntries, getWaitReasons, hasBuildFinishParameters, hasBuildProblemOfType, hasTests, initMetrics, isArtifactsExists, isHasInternalArtifactsOnly, isHasRelatedIssues, isInternalError, isOutdated, isOutOfChangesSequence, isPersonalPatchAvailable, isResponsibleNeeded, isStartedOnAgent, isTimedOut, isUsedByOtherBuilds, muteBuildProblems, now, nowDate, preloadFailedTests, publishStatisticValue, resetBuildFinalParameters, setBuildStartTimes, updateExternalArtifactsInfoOnAccess
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.Build
getBuildId, getBuildTypeName, getCompilationErrorMessages, getDuration, getFullName, getLogMessages, getStartDate, getTestMessages
-
Methods inherited from interface jetbrains.buildServer.serverSide.BuildPromotionOwner
getSequenceBuild
-
Methods inherited from interface jetbrains.buildServer.serverSide.ParametersSupport
getParametersProvider
-
Methods inherited from interface jetbrains.buildServer.serverSide.SBuild
addBuildProblem, convertToAgentTime, convertToServerTime, getArtifactDependencies, getArtifacts, getArtifactsDirectory, getBranch, getBuildComment, getBuildFeaturesOfType, getBuildOwnParameters, getChanges, getClientStartDate, getClientTimeZone, getCommitters, getContainingChanges, getCustomDataStorage, getDownloadedArtifacts, getFailureReasons, getFileContent, getFirstInternalError, getFirstInternalErrorMessage, getFullStatistics, getLabels, getOwner, getPreviousFinished, getProvidedArtifacts, getQueuedDate, getRecentlyFinishedBuild, getRelatedIssues, getRemoteArtifacts, getRemoteArtifactsByType, getRevisions, getServerStartDate, getShortStatistics, getStatisticValue, getStatisticValues, getTags, getTriggeredBy, getValueResolver, getVcsRootEntries, getWaitReasons, hasBuildProblemOfType, hasTests, isArtifactsExists, isHasInternalArtifactsOnly, isHasRelatedIssues, isInternalError, isOutdated, isOutOfChangesSequence, isResponsibleNeeded, isStartedOnAgent, isUsedByOtherBuilds
-
-
-
-
Constructor Detail
-
SecuredFinishedBuildImpl
public SecuredFinishedBuildImpl(long buildId, long buildPromotionId, @NotNull String buildTypeId, String agentName, int agentTypeId, @NotNull Date buildStartTimeServer, Date buildStartTimeAgent, @NotNull Date buildFinishTimeServer, @NotNull Status buildStatus, String finalStatusText, String buildNumber, boolean pin, boolean personal, CanceledInfo canceledInfo, String requestor, String buildDescription, @Nullable BuildPromotionEx buildPromotion, @NotNull BuildContext context)
-
-
Method Detail
-
setPinned
public void setPinned(boolean pinned, User user, String comment)
Description copied from interface:SFinishedBuild
Sets pin status for this build. Pinned builds will not be cleaned by the server cleanup process.- Specified by:
setPinned
in interfaceSFinishedBuild
- Overrides:
setPinned
in classFinishedBuildImpl
- Parameters:
pinned
- whether to pin build or not.user
- user who pins/unpins buildcomment
- comment
-
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 interfaceSBuild
- Overrides:
setBuildComment
in classBaseBuild
- Parameters:
user
- user who sets the commentcomment
- text of the comment
-
setTags
public void setTags(List<String> tags)
Description copied from interface:SBuild
Sets public tags for this build
-
setTags
public void setTags(User user, List<String> tags)
Description copied from interface:SBuild
Sets public tags for this build
-
setLabel
public void setLabel(String labelValue, List<VcsRootInstance> rootsToLabel) throws VcsException
Description copied from interface:SFinishedBuild
Sets a label on files in VCS repository used by this build in the specified VCS roots- Specified by:
setLabel
in interfaceSFinishedBuild
- Overrides:
setLabel
in classFinishedBuildImpl
- Parameters:
labelValue
- VCS label to set (references to properties are not supported)rootsToLabel
- VCS roots to label- Throws:
VcsException
- if labeling failed
-
getBuildFinishParameters
public DepParametersMemoryOptimizedMap getBuildFinishParameters()
Description copied from interface:FinishedBuildEx
This method returns build parameters (env, config, system) that were on build agent at the end of this build.This method may return
null
if there is no parameters were persisted- Specified by:
getBuildFinishParameters
in interfaceFinishedBuildEx
- Overrides:
getBuildFinishParameters
in classBaseBuild
- Returns:
- map of all parameters
-
getBuildStartParameters
public DepParametersMemoryOptimizedMap getBuildStartParameters()
Description copied from interface:FinishedBuildEx
This method returns build parameters (env, config, system) that were on build agent before build runners are called in the build.Parameters could change during the build by pluing or build/user actions
This method may return
null
if there is no parameters were persisted- Specified by:
getBuildStartParameters
in interfaceFinishedBuildEx
- Overrides:
getBuildStartParameters
in classBaseBuild
- Returns:
- map of all parameters
-
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 interfaceSBuild
- Overrides:
addUserBuildProblem
in classBaseBuild
- 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 interfaceSBuild
- Overrides:
muteBuildProblems
in classBaseBuild
- Parameters:
user
- user that will be used in auditmuteIfTrue
- pass true to make build successful, false to make existing problems visible againcomment
- 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 interfaceBuildEx
- Overrides:
deleteBuildProblem
in classBaseBuild
- Parameters:
user
- user that will be used in auditidentity
- identiry of build problem to be removedcomment
- comment for audit
-
getDeploymentStatus
@NotNull public SortedMap<BuildTypeEx,BuildPromotionEx> getDeploymentStatus()
- Specified by:
getDeploymentStatus
in interfaceFinishedBuildEx
- Overrides:
getDeploymentStatus
in classFinishedBuildImpl
- Returns:
- map of environment build configurations depending directly on configuration of this build by snapshot or artifact dependencies to the latest triggered build promotion which is using this build. If there is no triggered build yet, then corresponding value in map entry is null.
-
getAgent
@NotNull public BuildAgentEx getAgent()
- Specified by:
getAgent
in interfaceFinishedBuildEx
- Specified by:
getAgent
in interfaceSBuild
- Overrides:
getAgent
in classFinishedBuildImpl
- Returns:
- agent where this build executed.
-
updatePinInfo
public void updatePinInfo()
Description copied from interface:FinishedBuildEx
Reload pin status from the database- Specified by:
updatePinInfo
in interfaceFinishedBuildEx
- Overrides:
updatePinInfo
in classFinishedBuildImpl
-
-