public interface DeploymentResultService
| Modifier and Type | Method and Description |
|---|---|
int |
countDeploymentResultsForEnvironment(long environmentId)
Count deployment results for deployment.
|
DeploymentResult |
createDeploymentResult(long environmentId,
long deploymentVersionId,
@NotNull VariableContext variableContext,
@NotNull TriggerReason triggerReason) |
@NotNull Set<Long> |
findEnvironmentIdsVersionWasDeployedOn(long deploymentVersionId) |
@Nullable DeploymentResult |
getDeploymentResult(long deploymentResultId)
Retrieve a specific deployment result.
|
@NotNull List<Long> |
getDeploymentResultIdsForDeploymentVersionFinishedBefore(long deploymentVersionId,
@NotNull Date finishDate)
Get ids of all deployment results for deployment version finished before given date.
|
@NotNull List<DeploymentResult> |
getDeploymentResultsByLifeCycleState(Collection<LifeCycleState> lifeCycleStates) |
@NotNull List<DeploymentResult> |
getDeploymentResultsForDeploymentVersion(long deploymentVersionId)
Get all deployment results for deployment version.
|
@NotNull List<DeploymentResult> |
getDeploymentResultsForDeploymentVersionAndEnvironment(long deploymentVersionId,
long environmentId)
Get all deployment results for deployment versions that ran against the specified environment.
|
@NotNull List<DeploymentResult> |
getDeploymentResultsForDeploymentVersionFinishedBefore(long deploymentVersionId,
Date finishDate)
Deprecated.
since 5.10 on account of it potentially consuming lots of memory. Consider
getDeploymentResultIdsForDeploymentVersionFinishedBefore(long, Date) instead. |
@NotNull List<DeploymentResult> |
getDeploymentResultsForEnvironment(long environmentId)
Deprecated.
since 6.7 for performance reasons use
getDeploymentResultsForEnvironmentWithoutVariables(long, int, int) |
@NotNull List<DeploymentResult> |
getDeploymentResultsForEnvironment(long environmentId,
int offset,
int maxResults)
Deprecated.
since 6.7 for performance reasons use
getDeploymentResultsForEnvironmentWithoutVariables(long, int, int) |
@NotNull List<DeploymentResult> |
getDeploymentResultsForEnvironmentWithoutVariables(long environmentId,
int offset,
int maxResults)
Get deployment results for environment.
|
@Nullable DeploymentResult |
getLastResultBefore(@NotNull DeploymentResult deploymentResult) |
@Nullable DeploymentResult |
getLastResultInStatesBefore(@NotNull DeploymentResult deploymentResult,
@NotNull EnumSet<BuildState> buildStates) |
@Nullable DeploymentResult |
getLatestDeploymentResult(long environmentId,
long deploymentVersionId)
Retrieve a specific deployment result for an environment and version.
|
@Nullable DeploymentResult |
getLatestDeploymentResultForEnvironment(long environmentId)
Get the latest result that ran against an environment
|
@NotNull List<EnvironmentStatus> |
getLatestKnownDeploymentResultForEnvironments(Iterable<? extends Environment> environments)
Deprecated.
since 6.8 for performance reasons use
getLatestKnownDeploymentResultForEnvironmentsInProject(DeploymentProject) |
@NotNull List<EnvironmentStatus> |
getLatestKnownDeploymentResultForEnvironmentsInProject(@NotNull DeploymentProject deploymentProject)
Get the latest results that *actually* ran against a list of environments.
|
Map<Long,EnvironmentStatus> |
getLatestStatusForAllEnvironments(Map<Long,Environment> environmentsById,
Map<Long,DeploymentProject> deploymentProjectsById)
Deprecated.
since 6.8 use
getLatestStatusForEnvironments(List) |
@NotNull Map<Long,EnvironmentStatusForDashboard> |
getLatestStatusForEnvironments(@NotNull List<Long> environmentIds) |
@NotNull List<DeploymentResult> |
getResultsWhereDeploymentVersionIsDeployedNow(List<Long> environmentsId,
long deploymentVersionId) |
@Nullable DeploymentVersion |
getRollbackVersion(@NotNull DeploymentResult deploymentResult)
For a given deployment result find the version that existed on the environment before that deployment.
|
@Nullable DeploymentVersion |
getRollbackVersion(long environmentId)
For a given environment find the version that existed on the environment prior to the last deployment.
|
@NotNull List<EnvironmentStatusForAggregation> |
getStatusesForAggregationByProject(@NotNull DeploymentProject deploymentProject) |
@NotNull List<DeploymentResult> |
getSuccessfulDeploymentResultsForEnvironment(long environmentId,
int offset,
int maxResults)
Get successful deployment results for environment.
|
void |
setExecutingAgent(long deploymentResultId,
long agentId)
Set the agent that the deployment is executing on.
|
void |
updateDeploymentState(long deploymentResultId,
@NotNull BuildState buildState,
Map<String,String> customData)
Update the build state of the Deployment Result
|
void |
updateLifeCycleState(@NotNull DeploymentTimingPoint timingPoint,
@NotNull LifeCycleState lifeCycleState)
Update lifecycle state of the DeploymentResult
|
void |
updateLifeCycleState(long deploymentResultId,
@NotNull LifeCycleState lifeCycleState)
Update lifecycle state of the DeploymentResult.
|
DeploymentResult createDeploymentResult(long environmentId, long deploymentVersionId, @NotNull @NotNull VariableContext variableContext, @NotNull @NotNull TriggerReason triggerReason)
@Nullable @Nullable DeploymentResult getDeploymentResult(long deploymentResultId) throws org.acegisecurity.AccessDeniedException
deploymentResultId - of the resultorg.acegisecurity.AccessDeniedException - when logged in user don't have permissions to view deployment environment
for deployment result@Nullable @Nullable DeploymentResult getLatestDeploymentResult(long environmentId, long deploymentVersionId)
environmentId - of the environmentdeploymentVersionId - of the version@Deprecated @NotNull @NotNull List<DeploymentResult> getDeploymentResultsForEnvironment(long environmentId)
getDeploymentResultsForEnvironmentWithoutVariables(long, int, int)environmentId - id of environment to get results from@Deprecated @NotNull @NotNull List<DeploymentResult> getDeploymentResultsForEnvironment(long environmentId, int offset, int maxResults)
getDeploymentResultsForEnvironmentWithoutVariables(long, int, int)environmentId - id of environment to get results fromoffset - maxResults - @NotNull @NotNull List<DeploymentResult> getDeploymentResultsForEnvironmentWithoutVariables(long environmentId, int offset, int maxResults)
environmentId - id of environment to get results fromoffset - maxResults - @NotNull @NotNull List<DeploymentResult> getSuccessfulDeploymentResultsForEnvironment(long environmentId, int offset, int maxResults)
environmentId - id of environment to get results fromoffset - maxResults - @NotNull @NotNull List<DeploymentResult> getDeploymentResultsForDeploymentVersion(long deploymentVersionId)
deploymentVersionId - id of deployment version to get results from@NotNull @NotNull List<DeploymentResult> getDeploymentResultsForDeploymentVersionAndEnvironment(long deploymentVersionId, long environmentId)
deploymentVersionId - id of deployment versionenvironmentId - id of environment@Deprecated @NotNull @NotNull List<DeploymentResult> getDeploymentResultsForDeploymentVersionFinishedBefore(long deploymentVersionId, Date finishDate)
getDeploymentResultIdsForDeploymentVersionFinishedBefore(long, Date) instead.deploymentVersionId - id of deployment version to get results fromfinishDate - only select results finished before this date@NotNull @NotNull List<Long> getDeploymentResultIdsForDeploymentVersionFinishedBefore(long deploymentVersionId, @NotNull @NotNull Date finishDate)
deploymentVersionId - id of deployment version to get results fromfinishDate - only select results finished before this dateint countDeploymentResultsForEnvironment(long environmentId)
environmentId - @Nullable @Nullable DeploymentResult getLatestDeploymentResultForEnvironment(long environmentId)
environmentId - id of the environment@NotNull @Deprecated @NotNull List<EnvironmentStatus> getLatestKnownDeploymentResultForEnvironments(Iterable<? extends Environment> environments)
getLatestKnownDeploymentResultForEnvironmentsInProject(DeploymentProject)environments - we want to retrieve latest DeploymentResult@NotNull @NotNull List<EnvironmentStatus> getLatestKnownDeploymentResultForEnvironmentsInProject(@NotNull @NotNull DeploymentProject deploymentProject)
deploymentProject - we want to retrieve latest DeploymentResults for@NotNull @NotNull List<EnvironmentStatusForAggregation> getStatusesForAggregationByProject(@NotNull @NotNull DeploymentProject deploymentProject)
@NotNull @NotNull List<DeploymentResult> getDeploymentResultsByLifeCycleState(Collection<LifeCycleState> lifeCycleStates)
void updateLifeCycleState(long deploymentResultId,
@NotNull
@NotNull LifeCycleState lifeCycleState)
deploymentResultId - id of DeploymentResultlifeCycleState - lifecycle state to be setvoid updateLifeCycleState(@NotNull
@NotNull DeploymentTimingPoint timingPoint,
@NotNull
@NotNull LifeCycleState lifeCycleState)
timingPoint - deployment timing pointlifeCycleState - lifecycle state to be setvoid setExecutingAgent(long deploymentResultId,
long agentId)
deploymentResultId - id of the deployment resultagentId - if of the agentvoid updateDeploymentState(long deploymentResultId,
@NotNull
@NotNull BuildState buildState,
Map<String,String> customData)
deploymentResultId - if of result to updatebuildState - new value of the build state to savecustomData - @Nullable @Nullable DeploymentVersion getRollbackVersion(long environmentId)
environmentId - to find rollback version for.@Nullable @Nullable DeploymentVersion getRollbackVersion(@NotNull @NotNull DeploymentResult deploymentResult)
deploymentResult - deployment result that was deployed at some time on some environment@NotNull @NotNull Set<Long> findEnvironmentIdsVersionWasDeployedOn(long deploymentVersionId)
deploymentVersionId - @NotNull @NotNull List<DeploymentResult> getResultsWhereDeploymentVersionIsDeployedNow(List<Long> environmentsId, long deploymentVersionId)
environmentsId - list of environments to checkdeploymentVersionId - @Nullable @Nullable DeploymentResult getLastResultBefore(@NotNull @NotNull DeploymentResult deploymentResult)
@Nullable @Nullable DeploymentResult getLastResultInStatesBefore(@NotNull @NotNull DeploymentResult deploymentResult, @NotNull @NotNull EnumSet<BuildState> buildStates)
@Deprecated Map<Long,EnvironmentStatus> getLatestStatusForAllEnvironments(Map<Long,Environment> environmentsById, Map<Long,DeploymentProject> deploymentProjectsById)
getLatestStatusForEnvironments(List)environmentsById - pass all visible environments. Any environments not passed will not have results returned. This
can technically be used to retrieve deployment results for a subset of environments but it's
only efficient for significant sets. By definition this should not contain any environments without visible projects.deploymentProjectsById - All visible deployment projects.@NotNull @NotNull Map<Long,EnvironmentStatusForDashboard> getLatestStatusForEnvironments(@NotNull @NotNull List<Long> environmentIds) throws AccessDeniedException
AccessDeniedException - if user has no access to requested environment.Copyright © 2025 Atlassian Software Systems Pty Ltd. All rights reserved.