Class DeploymentContextImpl
- java.lang.Object
-
- com.atlassian.bamboo.deployments.execution.DeploymentContextImpl
-
- All Implemented Interfaces:
DeploymentContext
,CommonContext
,Serializable
public class DeploymentContextImpl extends Object implements DeploymentContext
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DeploymentContextImpl(@NotNull DeploymentProject deploymentProject, @NotNull DeploymentResult deploymentResult, @NotNull List<TaskDefinition> taskDefinitions, @NotNull Map<String,String> artifactHandlerConfiguration, @NotNull VariableContext variableContext, Map<Long,PlanRepositoryDefinition> planRepositoryDefinitionMap, com.google.common.collect.Multimap<String,Artifact> versionArtifacts, @Nullable DeploymentVersion previousVersion, @NotNull Iterable<CredentialsData> sharedCredentials, @NotNull Map<PlanKey,ChainStorageTag> necessaryStorageTags, @NotNull Map<String,Map<String,String>> pluginConfigMap, @NotNull DockerPipelineConfiguration dockerPipelineConfiguration, @NotNull CommonArtifactContext commonArtifactContext, boolean isVerboseLoggingOn, boolean expectingDedicatedEphemeralAgent)
-
Method Summary
-
-
-
Constructor Detail
-
DeploymentContextImpl
public DeploymentContextImpl(@NotNull @NotNull DeploymentProject deploymentProject, @NotNull @NotNull DeploymentResult deploymentResult, @NotNull @NotNull List<TaskDefinition> taskDefinitions, @NotNull @NotNull Map<String,String> artifactHandlerConfiguration, @NotNull @NotNull VariableContext variableContext, Map<Long,PlanRepositoryDefinition> planRepositoryDefinitionMap, com.google.common.collect.Multimap<String,Artifact> versionArtifacts, @Nullable @Nullable DeploymentVersion previousVersion, @NotNull @NotNull Iterable<CredentialsData> sharedCredentials, @NotNull @NotNull Map<PlanKey,ChainStorageTag> necessaryStorageTags, @NotNull @NotNull Map<String,Map<String,String>> pluginConfigMap, @NotNull @NotNull DockerPipelineConfiguration dockerPipelineConfiguration, @NotNull @NotNull CommonArtifactContext commonArtifactContext, boolean isVerboseLoggingOn, boolean expectingDedicatedEphemeralAgent)
-
-
Method Detail
-
getBuildKey
@NotNull public @NotNull BuildKey getBuildKey()
- Specified by:
getBuildKey
in interfaceCommonContext
-
getVcsRepositories
@NotNull public @NotNull List<PlanRepositoryDefinition> getVcsRepositories()
- Specified by:
getVcsRepositories
in interfaceCommonContext
-
getVcsRepositoryMap
@NotNull public @NotNull Map<Long,PlanRepositoryDefinition> getVcsRepositoryMap()
- Specified by:
getVcsRepositoryMap
in interfaceCommonContext
-
getDeploymentResultId
public long getDeploymentResultId()
- Specified by:
getDeploymentResultId
in interfaceDeploymentContext
-
getEnvironmentId
public long getEnvironmentId()
- Specified by:
getEnvironmentId
in interfaceDeploymentContext
-
getEntityGroupId
public Long getEntityGroupId()
Description copied from interface:CommonContext
Returns id of a group entity belongs to. E.g. returns deployment project's id if entity is a deployment environment.- Specified by:
getEntityGroupId
in interfaceCommonContext
- Returns:
- id of entity group or null if not applicable.
-
getDeploymentProjectId
public long getDeploymentProjectId()
- Specified by:
getDeploymentProjectId
in interfaceDeploymentContext
-
getEntityId
public long getEntityId()
- Specified by:
getEntityId
in interfaceCommonContext
-
getEntityKey
@NotNull public @NotNull Key getEntityKey()
- Specified by:
getEntityKey
in interfaceCommonContext
-
getResultKey
@NotNull public @NotNull ResultKey getResultKey()
- Specified by:
getResultKey
in interfaceCommonContext
-
getDisplayName
public String getDisplayName()
Description copied from interface:CommonContext
A human friendly description of what is being built.- Specified by:
getDisplayName
in interfaceCommonContext
- Returns:
-
getCurrentResult
public CurrentResult getCurrentResult()
- Specified by:
getCurrentResult
in interfaceCommonContext
-
getDeploymentVersion
@NotNull public @NotNull DeploymentVersion getDeploymentVersion()
- Specified by:
getDeploymentVersion
in interfaceDeploymentContext
-
getErrorCollection
@NotNull public @NotNull ErrorCollection getErrorCollection()
Description copied from interface:CommonContext
Any errors associated with the build- Specified by:
getErrorCollection
in interfaceCommonContext
-
getRuntimeTaskDefinitions
@NotNull public @NotNull List<RuntimeTaskDefinition> getRuntimeTaskDefinitions()
Description copied from interface:CommonContext
All tasks defined for this build. Contains both regular tasks and finalising tasks.- Specified by:
getRuntimeTaskDefinitions
in interfaceCommonContext
- Returns:
- A
List
ofRuntimeTaskDefinition
s
-
getVariableContext
@NotNull public @NotNull VariableContext getVariableContext()
- Specified by:
getVariableContext
in interfaceCommonContext
-
getArtifactHandlerConfiguration
@NotNull public @NotNull Map<String,String> getArtifactHandlerConfiguration()
- Specified by:
getArtifactHandlerConfiguration
in interfaceDeploymentContext
-
getTriggerReason
@NotNull public @NotNull TriggerReason getTriggerReason()
Description copied from interface:CommonContext
The reason this build was triggered- Specified by:
getTriggerReason
in interfaceCommonContext
- Returns:
- triggerReason
-
getVersionArtifacts
@NotNull public @NotNull com.google.common.collect.Multimap<String,Artifact> getVersionArtifacts()
- Specified by:
getVersionArtifacts
in interfaceDeploymentContext
-
getDeploymentProjectName
@NotNull public @NotNull String getDeploymentProjectName()
- Specified by:
getDeploymentProjectName
in interfaceDeploymentContext
-
getEnvironmentName
@NotNull public @NotNull String getEnvironmentName()
- Specified by:
getEnvironmentName
in interfaceDeploymentContext
-
isRollback
public boolean isRollback()
- Specified by:
isRollback
in interfaceDeploymentContext
-
getPreviousVersionName
@Nullable public @Nullable String getPreviousVersionName()
- Specified by:
getPreviousVersionName
in interfaceDeploymentContext
-
getPluginConfigMap
@NotNull public @NotNull Map<String,String> getPluginConfigMap(String key)
Description copied from interface:DeploymentContext
Returns configuration map that is mapped to provided key. Plugins can change its context during deployment execution. Any changes made to this map are not saved in database.- Specified by:
getPluginConfigMap
in interfaceDeploymentContext
- Parameters:
key
-CustomEnvironmentConfigPlugin
full plugin key- Returns:
- configuration map
-
getDockerPipelineConfiguration
@NotNull public @NotNull DockerPipelineConfiguration getDockerPipelineConfiguration()
- Specified by:
getDockerPipelineConfiguration
in interfaceCommonContext
-
getSharedCredentials
@NotNull public @NotNull Iterable<CredentialsData> getSharedCredentials()
- Specified by:
getSharedCredentials
in interfaceCommonContext
-
getChainStorageTags
@NotNull public @NotNull Map<PlanKey,ChainStorageTag> getChainStorageTags()
- Specified by:
getChainStorageTags
in interfaceCommonContext
-
getArtifactContext
@NotNull public @NotNull CommonArtifactContext getArtifactContext()
- Specified by:
getArtifactContext
in interfaceCommonContext
- Returns:
- Artifact data associated with plan or deployment
-
isVerboseLoggingOn
public boolean isVerboseLoggingOn()
Description copied from interface:CommonContext
Controls the amount of logging during the execution. Some of the logging is only output in verbose mode.- Specified by:
isVerboseLoggingOn
in interfaceCommonContext
- Returns:
- true if verbose logging is enabled.
-
isExpectingCustomDedicatedAgent
public boolean isExpectingCustomDedicatedAgent()
Description copied from interface:CommonContext
If this job is expected to be built on a custom dedicated agent- Specified by:
isExpectingCustomDedicatedAgent
in interfaceCommonContext
-
-