@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(@NotNull Job job,
@NotNull 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(@NotNull RequirementSet requirementSet,
@NotNull TaskDefinition taskDefinition,
Supplier<Set<Requirement>> requirementSupplier)
Attempts to add
Requirements to the specified RequirementSet. |
void |
calculateRequirementsForTaskDefinition(@NotNull RequirementSet requirementSet,
@NotNull TaskDefinition taskDefinition,
Supplier<Set<Requirement>> requirementSupplier,
boolean dockerPipelinesEnabled)
Attempts to add
Requirements to the specified RequirementSet. |
@NotNull List<TaskModuleDescriptor> |
getAvailableBuildTaskDescriptors() |
@NotNull List<TaskModuleDescriptor> |
getAvailableDeploymentTaskDescriptors() |
@NotNull List<TaskModuleDescriptor> |
getAvailableTaskDescriptors() |
Set<String> |
getCapabilitiesWithExecutables(@NotNull 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.
|
@NotNull com.google.common.collect.Multimap<String,String> |
getExecutableLabelTypesMap()
Returns a map of currently available "configured" executables - identified by a label.
|
@Nullable TaskModuleDescriptor |
getTaskDescriptor(@Nullable String pluginKey)
Get the task type descriptor matching a particular plugin key.
|
@NotNull Collection<Requirement> |
getTasksRequirements(@NotNull 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(@NotNull Buildable buildable,
@NotNull TaskDefinition taskDefinition)
Removes all the
Requirements that belong to the TaskDefinition |
void |
removeRequirementsForTaskDefinition(@NotNull RequirementSet requirementSet,
@NotNull TaskDefinition taskDefinition)
Removes all the
Requirements that belong to the TaskDefinition |
boolean |
taskProducesTestResults(@NotNull TaskDefinition taskDefinition)
Return true iff task defined in
TaskDefinition is configured to produce test results. |
void |
updateRepositoryIdsInTask(@NotNull TaskDefinition taskDefinition,
@NotNull Map<Long,Long> repositoryIdChanges)
Updates task configurations affected by repository edition.
|
void |
updateWorkingDirSelectors(@NotNull ImmutableBuildable job,
@NotNull BuildDefinition buildDefinition,
@NotNull 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 @Nullable TaskModuleDescriptor getTaskDescriptor(@Nullable @Nullable String pluginKey)
TaskManagergetTaskDescriptor in interface TaskManagerpluginKey - - key to match@NotNull public @NotNull List<TaskModuleDescriptor> getAvailableTaskDescriptors()
getAvailableTaskDescriptors in interface TaskManager@NotNull public @NotNull List<TaskModuleDescriptor> getAvailableBuildTaskDescriptors()
getAvailableBuildTaskDescriptors in interface TaskManager@NotNull public @NotNull List<TaskModuleDescriptor> getAvailableDeploymentTaskDescriptors()
getAvailableDeploymentTaskDescriptors in interface TaskManagerpublic void calculateRequirementsForTaskDefinition(@NotNull
@NotNull Job job,
@NotNull
@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
@NotNull RequirementSet requirementSet,
@NotNull
@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
@NotNull RequirementSet requirementSet,
@NotNull
@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
@NotNull Buildable buildable,
@NotNull
@NotNull TaskDefinition taskDefinition)
TaskManagerRequirements that belong to the TaskDefinitionremoveRequirementsForTaskDefinition in interface TaskManagerbuildable - to remove requirements fromtaskDefinition - that was removedpublic void removeRequirementsForTaskDefinition(@NotNull
@NotNull RequirementSet requirementSet,
@NotNull
@NotNull TaskDefinition taskDefinition)
TaskManagerRequirements that belong to the TaskDefinitionremoveRequirementsForTaskDefinition in interface TaskManagerrequirementSet - to remove requirements fromtaskDefinition - that was removedpublic void updateRepositoryIdsInTask(@NotNull
@NotNull TaskDefinition taskDefinition,
@NotNull
@NotNull Map<Long,Long> repositoryIdChanges)
TaskManagerupdateRepositoryIdsInTask in interface TaskManagerrepositoryIdChanges - mapping between old and new repositories idspublic void updateWorkingDirSelectors(@NotNull
@NotNull ImmutableBuildable job,
@NotNull
@NotNull BuildDefinition buildDefinition,
@NotNull
@NotNull Map<Long,Long> repositoryIdsChanges)
TaskManagerupdateWorkingDirSelectors in interface TaskManagerjob - affected jobrepositoryIdsChanges - mapping between old and new repositories ids@NotNull public @NotNull Collection<Requirement> getTasksRequirements(@NotNull @NotNull Job job)
TaskManagerRequirements for all tasks of Buildable if the TaskConfigurator is an implementor of BuildTaskRequirementSupportgetTasksRequirements in interface TaskManagerpublic boolean taskProducesTestResults(@NotNull
@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 TaskManager@NotNull public @NotNull com.google.common.collect.Multimap<String,String> getExecutableLabelTypesMap()
TaskManagerMaps label -> collection of taskExecutableType.getExecutableKey().
The executables are backed by available capabilities system wide, filtered by executables which are actually activated in the plugin system.
getExecutableLabelTypesMap in interface TaskManagerpublic Set<String> getCapabilitiesWithExecutables(@NotNull @NotNull Set<String> interestingExecutableTypes)
TaskManagergetCapabilitiesWithExecutables in interface TaskManagerpublic void recalculateRequirementsForJob(Job job, boolean dockerPipelinesEnabled)
TaskManagerrecalculateRequirementsForJob in interface TaskManagerCopyright © 2024 Atlassian Software Systems Pty Ltd. All rights reserved.