Class DeploymentContextImpl
java.lang.Object
com.atlassian.bamboo.deployments.execution.DeploymentContextImpl
- All Implemented Interfaces:
DeploymentContext
,CommonContext
,Serializable
- See Also:
-
Constructor Summary
ConstructorDescriptionDeploymentContextImpl
(@NotNull DeploymentProject deploymentProject, @NotNull DeploymentResult deploymentResult, @NotNull List<TaskDefinition> taskDefinitions, @NotNull Map<String, String> artifactHandlerConfiguration, @NotNull VariableContext variableContext, Map<Long, PlanRepositoryDefinition> planRepositoryDefinitionMap, 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
Modifier and TypeMethodDescription@NotNull CommonArtifactContext
@NotNull BuildKey
@NotNull Map<PlanKey,
ChainStorageTag> long
@NotNull String
long
@NotNull DeploymentVersion
A human friendly description of what is being built.@NotNull DockerPipelineConfiguration
Returns id of a group entity belongs to.long
@NotNull Key
long
@NotNull String
@NotNull ErrorCollection
Any errors associated with the buildgetPluginConfigMap
(String key) Returns configuration map that is mapped to provided key.@Nullable String
@NotNull ResultKey
@NotNull List<RuntimeTaskDefinition>
All tasks defined for this build.@NotNull Iterable<CredentialsData>
@NotNull TriggerReason
The reason this build was triggered@NotNull VariableContext
@NotNull List<PlanRepositoryDefinition>
@NotNull Map<Long,
PlanRepositoryDefinition> @NotNull ArtifactMultimap
boolean
If this job is expected to be built on a custom dedicated agentboolean
boolean
Controls the amount of logging during the execution.
-
Constructor Details
-
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, 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 Details
-
getBuildKey
- Specified by:
getBuildKey
in interfaceCommonContext
-
getVcsRepositories
- Specified by:
getVcsRepositories
in interfaceCommonContext
-
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
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
- Specified by:
getEntityKey
in interfaceCommonContext
-
getResultKey
- Specified by:
getResultKey
in interfaceCommonContext
-
getDisplayName
Description copied from interface:CommonContext
A human friendly description of what is being built.- Specified by:
getDisplayName
in interfaceCommonContext
- Returns:
-
getCurrentResult
- Specified by:
getCurrentResult
in interfaceCommonContext
-
getDeploymentVersion
- Specified by:
getDeploymentVersion
in interfaceDeploymentContext
-
getErrorCollection
Description copied from interface:CommonContext
Any errors associated with the build- Specified by:
getErrorCollection
in interfaceCommonContext
-
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
- Specified by:
getVariableContext
in interfaceCommonContext
-
getArtifactHandlerConfiguration
- Specified by:
getArtifactHandlerConfiguration
in interfaceDeploymentContext
-
getTriggerReason
Description copied from interface:CommonContext
The reason this build was triggered- Specified by:
getTriggerReason
in interfaceCommonContext
- Returns:
- triggerReason
-
getVersionArtifacts
- Specified by:
getVersionArtifacts
in interfaceDeploymentContext
-
getDeploymentProjectName
- Specified by:
getDeploymentProjectName
in interfaceDeploymentContext
-
getEnvironmentName
- Specified by:
getEnvironmentName
in interfaceDeploymentContext
-
isRollback
public boolean isRollback()- Specified by:
isRollback
in interfaceDeploymentContext
-
getPreviousVersionName
- Specified by:
getPreviousVersionName
in interfaceDeploymentContext
-
getPluginConfigMap
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
- Specified by:
getDockerPipelineConfiguration
in interfaceCommonContext
-
getChainStorageTags
- Specified by:
getChainStorageTags
in interfaceCommonContext
-
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
-