Class DeploymentContextImpl
java.lang.Object
com.atlassian.bamboo.deployments.execution.DeploymentContextImpl
- All Implemented Interfaces:
DeploymentContext,CommonContext,Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeploymentContextImpl(@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 Stringlong@NotNull DeploymentVersionA human friendly description of what is being built.@NotNull DockerPipelineConfigurationReturns id of a group entity belongs to.long@NotNull Keylong@NotNull String@NotNull ErrorCollectionAny 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 TriggerReasonThe reason this build was triggered@NotNull VariableContext@NotNull List<PlanRepositoryDefinition> @NotNull Map<Long, PlanRepositoryDefinition> @NotNull ArtifactMultimapbooleanIf this job is expected to be built on a custom dedicated agentbooleanbooleanControls 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:
getBuildKeyin interfaceCommonContext
-
getVcsRepositories
- Specified by:
getVcsRepositoriesin interfaceCommonContext
-
getVcsRepositoryMap
- Specified by:
getVcsRepositoryMapin interfaceCommonContext
-
getDeploymentResultId
public long getDeploymentResultId()- Specified by:
getDeploymentResultIdin interfaceDeploymentContext
-
getEnvironmentId
public long getEnvironmentId()- Specified by:
getEnvironmentIdin interfaceDeploymentContext
-
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
- Specified by:
getEntityKeyin interfaceCommonContext
-
getResultKey
- Specified by:
getResultKeyin interfaceCommonContext
-
getDisplayName
Description copied from interface:CommonContextA human friendly description of what is being built.- Specified by:
getDisplayNamein interfaceCommonContext- Returns:
-
getCurrentResult
- Specified by:
getCurrentResultin interfaceCommonContext
-
getDeploymentVersion
- Specified by:
getDeploymentVersionin interfaceDeploymentContext
-
getErrorCollection
Description copied from interface:CommonContextAny errors associated with the build- Specified by:
getErrorCollectionin interfaceCommonContext
-
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
- Specified by:
getVariableContextin interfaceCommonContext
-
getArtifactHandlerConfiguration
- Specified by:
getArtifactHandlerConfigurationin interfaceDeploymentContext
-
getTriggerReason
Description copied from interface:CommonContextThe reason this build was triggered- Specified by:
getTriggerReasonin interfaceCommonContext- Returns:
- triggerReason
-
getVersionArtifacts
- Specified by:
getVersionArtifactsin interfaceDeploymentContext
-
getDeploymentProjectName
- Specified by:
getDeploymentProjectNamein interfaceDeploymentContext
-
getEnvironmentName
- Specified by:
getEnvironmentNamein interfaceDeploymentContext
-
isRollback
public boolean isRollback()- Specified by:
isRollbackin interfaceDeploymentContext
-
getPreviousVersionName
- Specified by:
getPreviousVersionNamein interfaceDeploymentContext
-
getPluginConfigMap
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
- Specified by:
getDockerPipelineConfigurationin interfaceCommonContext
-
getChainStorageTags
- Specified by:
getChainStorageTagsin interfaceCommonContext
-
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
-