@Internal public class TaskManagerImpl extends Object implements TaskManager
| Modifier and Type | Field and Description |
|---|---|
static Requirement |
DOCKERBOX_REQUIREMENT
Referential DockerBox requirement
|
| Constructor and Description |
|---|
TaskManagerImpl(com.atlassian.plugin.PluginAccessor pluginAccessor,
CapabilitySetManager capabilitySetManager,
ElasticAccountBean elasticAccountBean,
VcsRepositoryManager vcsRepositoryManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
calculateRequirementsForTaskDefinition(Job job,
TaskDefinition taskDefinition)
Attempts to add
Requirements to the specified Buildable if the TaskConfigurator is an implementor of BuildTaskRequirementSupport
If requirements are already present for the specified TaskDefinition they will be removed and recalculated |
void |
calculateRequirementsForTaskDefinition(RequirementSet requirementSet,
TaskDefinition taskDefinition,
Supplier<Set<Requirement>> requirementSupplier)
Attempts to add
Requirements to the specified RequirementSet. |
void |
calculateRequirementsForTaskDefinition(RequirementSet requirementSet,
TaskDefinition taskDefinition,
Supplier<Set<Requirement>> requirementSupplier,
boolean dockerPipelinesEnabled)
Attempts to add
Requirements to the specified RequirementSet. |
List<TaskModuleDescriptor> |
getAvailableBuildTaskDescriptors() |
List<TaskModuleDescriptor> |
getAvailableDeploymentTaskDescriptors() |
List<TaskModuleDescriptor> |
getAvailableTaskDescriptors() |
Set<String> |
getCapabilitiesWithExecutables(Set<String> interestingExecutableTypes)
Returns a set of capabilities that have executable types defined for them in the system.
|
Map<String,String> |
getExecutableLabelTypeMap()
Returns a map of currently available "configured" executables - uniquely identified by a label.
|
TaskModuleDescriptor |
getTaskDescriptor(String pluginKey)
Get the task type descriptor matching a particular plugin key.
|
Collection<Requirement> |
getTasksRequirements(Job job)
Return
Requirements for all tasks of Buildable if the TaskConfigurator is an implementor of BuildTaskRequirementSupport |
void |
recalculateRequirementsForJob(Job job,
boolean dockerPipelinesEnabled)
Recalculates requirements for job with given docker pipelines flag.
|
void |
removeRequirementsForTaskDefinition(Buildable buildable,
TaskDefinition taskDefinition)
Removes all the
Requirements that belong to the TaskDefinition |
void |
removeRequirementsForTaskDefinition(RequirementSet requirementSet,
TaskDefinition taskDefinition)
Removes all the
Requirements that belong to the TaskDefinition |
boolean |
taskProducesTestResults(TaskDefinition taskDefinition)
Return true iff task defined in
TaskDefinition is configured to produce test results. |
void |
updateRepositoryIdsInTask(TaskDefinition taskDefinition,
Map<Long,Long> repositoryIdChanges)
Updates task configurations affected by repository edition.
|
void |
updateWorkingDirSelectors(ImmutableBuildable job,
BuildDefinition buildDefinition,
Map<Long,Long> repositoryIdsChanges)
Calculates id of the repository that defines working directory after repository or task edition.
|
public static final Requirement DOCKERBOX_REQUIREMENT
public TaskManagerImpl(com.atlassian.plugin.PluginAccessor pluginAccessor,
CapabilitySetManager capabilitySetManager,
ElasticAccountBean elasticAccountBean,
VcsRepositoryManager vcsRepositoryManager)
@Nullable public TaskModuleDescriptor getTaskDescriptor(@Nullable String pluginKey)
TaskManagergetTaskDescriptor in interface TaskManagerpluginKey - - key to match@NotNull public List<TaskModuleDescriptor> getAvailableTaskDescriptors()
getAvailableTaskDescriptors in interface TaskManager@NotNull public List<TaskModuleDescriptor> getAvailableBuildTaskDescriptors()
getAvailableBuildTaskDescriptors in interface TaskManager@NotNull public List<TaskModuleDescriptor> getAvailableDeploymentTaskDescriptors()
getAvailableDeploymentTaskDescriptors in interface TaskManagerpublic void calculateRequirementsForTaskDefinition(@NotNull
Job job,
@NotNull
TaskDefinition taskDefinition)
TaskManagerRequirements to the specified Buildable if the TaskConfigurator is an implementor of BuildTaskRequirementSupport
If requirements are already present for the specified TaskDefinition they will be removed and recalculatedcalculateRequirementsForTaskDefinition in interface TaskManagerpublic void calculateRequirementsForTaskDefinition(@NotNull
RequirementSet requirementSet,
@NotNull
TaskDefinition taskDefinition,
Supplier<Set<Requirement>> requirementSupplier)
TaskManagerRequirements to the specified RequirementSet. How to get the requirements from the task Definition is determined by the supplier.
If requirements are already present for the specified TaskDefinition they will be removed and recalculatedcalculateRequirementsForTaskDefinition in interface TaskManagerrequirementSet - to add requirements update requirements intaskDefinition - to calculate requirements frompublic void calculateRequirementsForTaskDefinition(@NotNull
RequirementSet requirementSet,
@NotNull
TaskDefinition taskDefinition,
Supplier<Set<Requirement>> requirementSupplier,
boolean dockerPipelinesEnabled)
TaskManagerRequirements to the specified RequirementSet. How to get the requirements from the task Definition is determined by the supplier.
If requirements are already present for the specified TaskDefinition they will be removed and recalculated.
If docker pipelines is enabled than requirements from requirementSupplier won't be added to RequirementSet, instead of this docker requirement will be added.calculateRequirementsForTaskDefinition in interface TaskManagerrequirementSet - to add requirements update requirements intaskDefinition - to calculate requirements fromdockerPipelinesEnabled - flag for docker pipelinespublic void removeRequirementsForTaskDefinition(@NotNull
Buildable buildable,
@NotNull
TaskDefinition taskDefinition)
TaskManagerRequirements that belong to the TaskDefinitionremoveRequirementsForTaskDefinition in interface TaskManagerbuildable - to remove requirements fromtaskDefinition - that was removedpublic void removeRequirementsForTaskDefinition(@NotNull
RequirementSet requirementSet,
@NotNull
TaskDefinition taskDefinition)
TaskManagerRequirements that belong to the TaskDefinitionremoveRequirementsForTaskDefinition in interface TaskManagerrequirementSet - to remove requirements fromtaskDefinition - that was removedpublic void updateRepositoryIdsInTask(@NotNull
TaskDefinition taskDefinition,
@NotNull
Map<Long,Long> repositoryIdChanges)
TaskManagerupdateRepositoryIdsInTask in interface TaskManagerrepositoryIdChanges - mapping between old and new repositories idspublic void updateWorkingDirSelectors(@NotNull
ImmutableBuildable job,
@NotNull
BuildDefinition buildDefinition,
@NotNull
Map<Long,Long> repositoryIdsChanges)
TaskManagerupdateWorkingDirSelectors in interface TaskManagerjob - affected jobrepositoryIdsChanges - mapping between old and new repositories ids@NotNull public Collection<Requirement> getTasksRequirements(@NotNull Job job)
TaskManagerRequirements for all tasks of Buildable if the TaskConfigurator is an implementor of BuildTaskRequirementSupportgetTasksRequirements in interface TaskManagerpublic boolean taskProducesTestResults(@NotNull
TaskDefinition taskDefinition)
TaskManagerTaskDefinition is configured to produce test results.taskProducesTestResults in interface TaskManagerpublic Map<String,String> getExecutableLabelTypeMap()
TaskManagerMaps label -> taskExecutableType.getExecutableKey().
The executables are backed by available capabilities system wide, filtered by executables which are actually activated in the plugin system.
getExecutableLabelTypeMap in interface TaskManagerpublic Set<String> getCapabilitiesWithExecutables(@NotNull Set<String> interestingExecutableTypes)
TaskManagergetCapabilitiesWithExecutables in interface TaskManagerpublic void recalculateRequirementsForJob(Job job, boolean dockerPipelinesEnabled)
TaskManagerrecalculateRequirementsForJob in interface TaskManagerCopyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.