@PublicApi
public interface TaskManager
| 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)
Deprecated.
|
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> executableType)
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.
|
@NotNull List<TaskModuleDescriptor> getAvailableTaskDescriptors()
@NotNull List<TaskModuleDescriptor> getAvailableBuildTaskDescriptors()
@NotNull List<TaskModuleDescriptor> getAvailableDeploymentTaskDescriptors()
@Nullable TaskModuleDescriptor getTaskDescriptor(@Nullable String pluginKey)
pluginKey - - key to matchvoid calculateRequirementsForTaskDefinition(@NotNull
Job job,
@NotNull
TaskDefinition taskDefinition)
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 recalculatedjob - taskDefinition - @Deprecated void calculateRequirementsForTaskDefinition(@NotNull RequirementSet requirementSet, @NotNull TaskDefinition taskDefinition, Supplier<Set<Requirement>> requirementSupplier)
calculateRequirementsForTaskDefinition(RequirementSet, TaskDefinition, Supplier, boolean) insteadRequirements 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 recalculatedrequirementSet - to add requirements update requirements intaskDefinition - to calculate requirements fromvoid calculateRequirementsForTaskDefinition(@NotNull
RequirementSet requirementSet,
@NotNull
TaskDefinition taskDefinition,
Supplier<Set<Requirement>> requirementSupplier,
boolean dockerPipelinesEnabled)
Requirements 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.requirementSet - to add requirements update requirements intaskDefinition - to calculate requirements fromdockerPipelinesEnabled - flag for docker pipelinesvoid removeRequirementsForTaskDefinition(@NotNull
Buildable buildable,
@NotNull
TaskDefinition taskDefinition)
Requirements that belong to the TaskDefinitionbuildable - to remove requirements fromtaskDefinition - that was removedvoid removeRequirementsForTaskDefinition(@NotNull
RequirementSet requirementSet,
@NotNull
TaskDefinition taskDefinition)
Requirements that belong to the TaskDefinitionrequirementSet - to remove requirements fromtaskDefinition - that was removed@NotNull Collection<Requirement> getTasksRequirements(@NotNull Job job)
Requirements for all tasks of Buildable if the TaskConfigurator is an implementor of BuildTaskRequirementSupportjob@throws - IllegalStateExceptionboolean taskProducesTestResults(@NotNull
TaskDefinition taskDefinition)
TaskDefinition is configured to produce test results.taskDefinition - Map<String,String> getExecutableLabelTypeMap()
Maps label -> taskExecutableType.getExecutableKey().
The executables are backed by available capabilities system wide, filtered by executables which are actually activated in the plugin system.
void updateRepositoryIdsInTask(@NotNull
TaskDefinition taskDefinition,
@NotNull
Map<Long,Long> repositoryIdChanges)
taskDefinition - repositoryIdChanges - mapping between old and new repositories idsvoid updateWorkingDirSelectors(@NotNull
ImmutableBuildable job,
@NotNull
BuildDefinition buildDefinition,
@NotNull
Map<Long,Long> repositoryIdsChanges)
job - affected jobbuildDefinition - repositoryIdsChanges - mapping between old and new repositories idsSet<String> getCapabilitiesWithExecutables(@NotNull Set<String> executableType)
void recalculateRequirementsForJob(Job job, boolean dockerPipelinesEnabled)
job - dockerPipelinesEnabled - Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.