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:
getBuildKeyin interfaceCommonContext
-
getVcsRepositories
@NotNull public @NotNull List<PlanRepositoryDefinition> getVcsRepositories()
- Specified by:
getVcsRepositoriesin interfaceCommonContext
-
getVcsRepositoryMap
@NotNull public @NotNull Map<Long,PlanRepositoryDefinition> getVcsRepositoryMap()
- Specified by:
getVcsRepositoryMapin interfaceCommonContext
-
getDeploymentResultId
public long getDeploymentResultId()
- Specified by:
getDeploymentResultIdin interfaceDeploymentContext
-
getEnvironmentId
public long getEnvironmentId()
- Specified by:
getEnvironmentIdin interfaceDeploymentContext
-
getEntityGroupId
public Long getEntityGroupId()
Description copied from interface:CommonContextReturns id of a group entity belongs to. E.g. returns deployment project's id if entity is a deployment environment.- Specified by:
getEntityGroupIdin interfaceCommonContext- Returns:
- id of entity group or null if not applicable.
-
getDeploymentProjectId
public long getDeploymentProjectId()
- Specified by:
getDeploymentProjectIdin interfaceDeploymentContext
-
getEntityId
public long getEntityId()
- Specified by:
getEntityIdin interfaceCommonContext
-
getEntityKey
@NotNull public @NotNull Key getEntityKey()
- Specified by:
getEntityKeyin interfaceCommonContext
-
getResultKey
@NotNull public @NotNull ResultKey getResultKey()
- Specified by:
getResultKeyin interfaceCommonContext
-
getDisplayName
public String getDisplayName()
Description copied from interface:CommonContextA human friendly description of what is being built.- Specified by:
getDisplayNamein interfaceCommonContext- Returns:
-
getCurrentResult
public CurrentResult getCurrentResult()
- Specified by:
getCurrentResultin interfaceCommonContext
-
getDeploymentVersion
@NotNull public @NotNull DeploymentVersion getDeploymentVersion()
- Specified by:
getDeploymentVersionin interfaceDeploymentContext
-
getErrorCollection
@NotNull public @NotNull ErrorCollection getErrorCollection()
Description copied from interface:CommonContextAny errors associated with the build- Specified by:
getErrorCollectionin interfaceCommonContext
-
getRuntimeTaskDefinitions
@NotNull public @NotNull List<RuntimeTaskDefinition> getRuntimeTaskDefinitions()
Description copied from interface:CommonContextAll tasks defined for this build. Contains both regular tasks and finalising tasks.- Specified by:
getRuntimeTaskDefinitionsin interfaceCommonContext- Returns:
- A
ListofRuntimeTaskDefinitions
-
getVariableContext
@NotNull public @NotNull VariableContext getVariableContext()
- Specified by:
getVariableContextin interfaceCommonContext
-
getArtifactHandlerConfiguration
@NotNull public @NotNull Map<String,String> getArtifactHandlerConfiguration()
- Specified by:
getArtifactHandlerConfigurationin interfaceDeploymentContext
-
getTriggerReason
@NotNull public @NotNull TriggerReason getTriggerReason()
Description copied from interface:CommonContextThe reason this build was triggered- Specified by:
getTriggerReasonin interfaceCommonContext- Returns:
- triggerReason
-
getVersionArtifacts
@NotNull public @NotNull com.google.common.collect.Multimap<String,Artifact> getVersionArtifacts()
- Specified by:
getVersionArtifactsin interfaceDeploymentContext
-
getDeploymentProjectName
@NotNull public @NotNull String getDeploymentProjectName()
- Specified by:
getDeploymentProjectNamein interfaceDeploymentContext
-
getEnvironmentName
@NotNull public @NotNull String getEnvironmentName()
- Specified by:
getEnvironmentNamein interfaceDeploymentContext
-
isRollback
public boolean isRollback()
- Specified by:
isRollbackin interfaceDeploymentContext
-
getPreviousVersionName
@Nullable public @Nullable String getPreviousVersionName()
- Specified by:
getPreviousVersionNamein interfaceDeploymentContext
-
getPluginConfigMap
@NotNull public @NotNull Map<String,String> getPluginConfigMap(String key)
Description copied from interface:DeploymentContextReturns 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:
getPluginConfigMapin interfaceDeploymentContext- Parameters:
key-CustomEnvironmentConfigPluginfull plugin key- Returns:
- configuration map
-
getDockerPipelineConfiguration
@NotNull public @NotNull DockerPipelineConfiguration getDockerPipelineConfiguration()
- Specified by:
getDockerPipelineConfigurationin interfaceCommonContext
-
getSharedCredentials
@NotNull public @NotNull Iterable<CredentialsData> getSharedCredentials()
- Specified by:
getSharedCredentialsin interfaceCommonContext
-
getChainStorageTags
@NotNull public @NotNull Map<PlanKey,ChainStorageTag> getChainStorageTags()
- Specified by:
getChainStorageTagsin interfaceCommonContext
-
getArtifactContext
@NotNull public @NotNull CommonArtifactContext getArtifactContext()
- Specified by:
getArtifactContextin interfaceCommonContext- Returns:
- Artifact data associated with plan or deployment
-
isVerboseLoggingOn
public boolean isVerboseLoggingOn()
Description copied from interface:CommonContextControls the amount of logging during the execution. Some of the logging is only output in verbose mode.- Specified by:
isVerboseLoggingOnin interfaceCommonContext- Returns:
- true if verbose logging is enabled.
-
isExpectingCustomDedicatedAgent
public boolean isExpectingCustomDedicatedAgent()
Description copied from interface:CommonContextIf this job is expected to be built on a custom dedicated agent- Specified by:
isExpectingCustomDedicatedAgentin interfaceCommonContext
-
-