public interface DeploymentResultService
Modifier and Type | Method and Description |
---|---|
int |
countDeploymentResultsForEnvironment(long environmentId)
Count deployment results for deployment.
|
DeploymentResult |
createDeploymentResult(long environmentId,
long deploymentVersionId,
VariableContext variableContext,
TriggerReason triggerReason) |
Set<Long> |
findEnvironmentIdsVersionWasDeployedOn(long deploymentVersionId) |
DeploymentResult |
getDeploymentResult(long deploymentResultId)
Retrieve a specific deployment result.
|
List<Long> |
getDeploymentResultIdsForDeploymentVersionFinishedBefore(long deploymentVersionId,
Date finishDate)
Get ids of all deployment results for deployment version finished before given date.
|
List<DeploymentResult> |
getDeploymentResultsByLifeCycleState(Collection<LifeCycleState> lifeCycleStates) |
List<DeploymentResult> |
getDeploymentResultsForDeploymentVersion(long deploymentVersionId)
Get all deployment results for deployment version.
|
List<DeploymentResult> |
getDeploymentResultsForDeploymentVersionAndEnvironment(long deploymentVersionId,
long environmentId)
Get all deployment results for deployment versions that ran against the specified environment.
|
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. |
List<DeploymentResult> |
getDeploymentResultsForEnvironment(long environmentId)
Deprecated.
since 6.7 for performance reasons use
getDeploymentResultsForEnvironmentWithoutVariables(long, int, int) |
List<DeploymentResult> |
getDeploymentResultsForEnvironment(long environmentId,
int offset,
int maxResults)
Deprecated.
since 6.7 for performance reasons use
getDeploymentResultsForEnvironmentWithoutVariables(long, int, int) |
List<DeploymentResult> |
getDeploymentResultsForEnvironmentWithoutVariables(long environmentId,
int offset,
int maxResults)
Get deployment results for environment.
|
DeploymentResult |
getLastResultBefore(DeploymentResult deploymentResult) |
DeploymentResult |
getLastResultInStatesBefore(DeploymentResult deploymentResult,
EnumSet<BuildState> buildStates) |
DeploymentResult |
getLatestDeploymentResult(long environmentId,
long deploymentVersionId)
Retrieve a specific deployment result for an environment and version.
|
DeploymentResult |
getLatestDeploymentResultForEnvironment(long environmentId)
Get the latest result that ran against an environment
|
List<EnvironmentStatus> |
getLatestKnownDeploymentResultForEnvironments(Iterable<? extends Environment> environments)
Deprecated.
since 6.8 for performance reasons use
getLatestKnownDeploymentResultForEnvironmentsInProject(DeploymentProject) |
List<EnvironmentStatus> |
getLatestKnownDeploymentResultForEnvironmentsInProject(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) |
Map<Long,EnvironmentStatusForDashboard> |
getLatestStatusForEnvironments(List<Long> environmentIds) |
List<DeploymentResult> |
getResultsWhereDeploymentVersionIsDeployedNow(List<Long> environmentsId,
long deploymentVersionId) |
DeploymentVersion |
getRollbackVersion(DeploymentResult deploymentResult)
For a given deployment result find the version that existed on the environment before that deployment.
|
DeploymentVersion |
getRollbackVersion(long environmentId)
For a given environment find the version that existed on the environment prior to the last deployment.
|
List<DeploymentResult> |
getSuccessfulDeploymentResultsForEnvironment(long environmentId,
int offset,
int maxResults)
Get successful deployment results for environment.
|
void |
logSubstitutedVariables(long deploymentResultId,
Map<String,VariableSubstitutionContext> substitutions)
Deprecated.
since 5.15 without replacement, does nothing
|
void |
setExecutingAgent(long deploymentResultId,
long agentId)
Set the agent that the deployment is executing on.
|
void |
updateDeploymentState(long deploymentResultId,
BuildState buildState,
Map<String,String> customData)
Update the build state of the Deployment Result
|
void |
updateLifeCycleState(DeploymentTimingPoint timingPoint,
LifeCycleState lifeCycleState)
Update lifecycle state of the DeploymentResult
|
void |
updateLifeCycleState(long deploymentResultId,
LifeCycleState lifeCycleState)
Update lifecycle state of the DeploymentResult.
|
DeploymentResult createDeploymentResult(long environmentId, long deploymentVersionId, @NotNull VariableContext variableContext, @NotNull TriggerReason triggerReason)
@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 DeploymentResult getLatestDeploymentResult(long environmentId, long deploymentVersionId)
environmentId
- of the environmentdeploymentVersionId
- of the version@Deprecated @NotNull List<DeploymentResult> getDeploymentResultsForEnvironment(long environmentId)
getDeploymentResultsForEnvironmentWithoutVariables(long, int, int)
environmentId
- id of environment to get results from@Deprecated @NotNull List<DeploymentResult> getDeploymentResultsForEnvironment(long environmentId, int offset, int maxResults)
getDeploymentResultsForEnvironmentWithoutVariables(long, int, int)
environmentId
- id of environment to get results fromoffset
- maxResults
- @NotNull List<DeploymentResult> getDeploymentResultsForEnvironmentWithoutVariables(long environmentId, int offset, int maxResults)
environmentId
- id of environment to get results fromoffset
- maxResults
- @NotNull List<DeploymentResult> getSuccessfulDeploymentResultsForEnvironment(long environmentId, int offset, int maxResults)
environmentId
- id of environment to get results fromoffset
- maxResults
- @NotNull List<DeploymentResult> getDeploymentResultsForDeploymentVersion(long deploymentVersionId)
deploymentVersionId
- id of deployment version to get results from@NotNull List<DeploymentResult> getDeploymentResultsForDeploymentVersionAndEnvironment(long deploymentVersionId, long environmentId)
deploymentVersionId
- id of deployment versionenvironmentId
- id of environment@Deprecated @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 List<Long> getDeploymentResultIdsForDeploymentVersionFinishedBefore(long deploymentVersionId, @NotNull Date finishDate)
deploymentVersionId
- id of deployment version to get results fromfinishDate
- only select results finished before this dateint countDeploymentResultsForEnvironment(long environmentId)
environmentId
- @Nullable DeploymentResult getLatestDeploymentResultForEnvironment(long environmentId)
environmentId
- id of the environment@NotNull @Deprecated List<EnvironmentStatus> getLatestKnownDeploymentResultForEnvironments(Iterable<? extends Environment> environments)
getLatestKnownDeploymentResultForEnvironmentsInProject(DeploymentProject)
environments
- we want to retrieve latest DeploymentResult@NotNull List<EnvironmentStatus> getLatestKnownDeploymentResultForEnvironmentsInProject(@NotNull DeploymentProject deploymentProject)
deploymentProject
- we want to retrieve latest DeploymentResults for@NotNull List<DeploymentResult> getDeploymentResultsByLifeCycleState(Collection<LifeCycleState> lifeCycleStates)
void updateLifeCycleState(long deploymentResultId, @NotNull LifeCycleState lifeCycleState)
deploymentResultId
- id of DeploymentResultlifeCycleState
- lifecycle state to be setvoid updateLifeCycleState(@NotNull DeploymentTimingPoint timingPoint, @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 BuildState buildState, Map<String,String> customData)
deploymentResultId
- if of result to updatebuildState
- new value of the build state to savecustomData
- @Deprecated void logSubstitutedVariables(long deploymentResultId, Map<String,VariableSubstitutionContext> substitutions)
@Nullable DeploymentVersion getRollbackVersion(long environmentId)
environmentId
- to find rollback version for.@Nullable DeploymentVersion getRollbackVersion(@NotNull DeploymentResult deploymentResult)
deploymentResult
- deployment result that was deployed at some time on some environment@NotNull Set<Long> findEnvironmentIdsVersionWasDeployedOn(long deploymentVersionId)
deploymentVersionId
- @NotNull List<DeploymentResult> getResultsWhereDeploymentVersionIsDeployedNow(List<Long> environmentsId, long deploymentVersionId)
environmentsId
- list of environments to checkdeploymentVersionId
- @Nullable DeploymentResult getLastResultBefore(@NotNull DeploymentResult deploymentResult)
@Nullable DeploymentResult getLastResultInStatesBefore(@NotNull DeploymentResult deploymentResult, @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 Map<Long,EnvironmentStatusForDashboard> getLatestStatusForEnvironments(@NotNull List<Long> environmentIds) throws AccessDeniedException
AccessDeniedException
- if user has no access to requested environment.Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.