Interface CapabilitySetManager
-
- All Superinterfaces:
RemotedCapabilitySetManager
- All Known Implementing Classes:
CapabilitySetManagerImpl
public interface CapabilitySetManager extends RemotedCapabilitySetManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NotNull CapabilitySet
createAgentCapabilitySet(@NotNull LocalAgentDefinition pipelineDefinition)
Create an agent scope capability set for local agents@NotNull CapabilitySet
createAgentCapabilitySet(@NotNull RemoteAgentDefinition pipelineDefinition)
Create an agent scope capability set for remote agents@NotNull List<String>
findUniqueCapabilityKeys()
Finds all the distinct capability keys@NotNull ReadOnlyCapabilitySet
getCombinedCapabilitySet(@NotNull CapabilitySet agentCapabilitySet)
Gets a combined "effective" capabilitySet given an agent's capabilitySet.ReadOnlyCapabilitySet
getCombinedCapabilitySet(@NotNull CapabilitySet agentCapabilitySet, @Nullable CapabilitySet sharedCapabilitySet)
Gets a combined "effective" capabilitySet given an agent's capability set and a shared capability set The agent capabilitySet will override capabilities in theCapabilityScope.SHARED
capabilities if there's a precise key match.@Nullable ElasticImageConfiguration
getElasticImage(@NotNull CapabilitySet capabilitySet)
@Nullable PipelineDefinition
getPipelineDefinition(@NotNull CapabilitySet capabilitySet)
@Nullable CapabilitySet
getSharedCapabilitySet(@NotNull CapabilitySet agentCapabilitySet)
CapabilitySet
getSharedRemoteCapabilitySet()
Gets the remotely shared capabilities@NotNull Collection<Capability>
getSystemCapabilities(@NotNull String type)
Collection ofCapability
which have keys prefixed with system.{type} Used to identify Bamboo system capabilities for Builders / JDKs.@NotNull Collection<Capability>
getSystemCapabilitiesByKey(@NotNull String key)
Collection ofCapability
which have the specified key@NotNull Collection<String>
getSystemCapabilityKeys(@NotNull String type, boolean isElasticEnabled)
Returns a list of Capability Keys that match the given typevoid
saveCapabilitySet(@NotNull CapabilitySet capabilitySet)
Saves a capability set-
Methods inherited from interface com.atlassian.bamboo.v2.build.agent.capability.RemotedCapabilitySetManager
getCombinedCapabilitySet, getSharedLocalCapabilitySet
-
-
-
-
Method Detail
-
getSharedRemoteCapabilitySet
CapabilitySet getSharedRemoteCapabilitySet()
Gets the remotely shared capabilities- Returns:
CapabilitySet
-
getSharedCapabilitySet
@Nullable @Deprecated @Nullable CapabilitySet getSharedCapabilitySet(@NotNull @NotNull CapabilitySet agentCapabilitySet)
Deprecated.Gets the shared capabilities depending on agentCapability type.- Parameters:
agentCapabilitySet
-- Returns:
- shared capability set, null if neither Local nor Remote capability set passed as parameter
-
saveCapabilitySet
void saveCapabilitySet(@NotNull @NotNull CapabilitySet capabilitySet)
Saves a capability set- Parameters:
capabilitySet
-
-
createAgentCapabilitySet
@NotNull @NotNull CapabilitySet createAgentCapabilitySet(@NotNull @NotNull LocalAgentDefinition pipelineDefinition)
Create an agent scope capability set for local agents- Parameters:
pipelineDefinition
-- Returns:
-
createAgentCapabilitySet
@NotNull @NotNull CapabilitySet createAgentCapabilitySet(@NotNull @NotNull RemoteAgentDefinition pipelineDefinition)
Create an agent scope capability set for remote agents- Parameters:
pipelineDefinition
-- Returns:
-
getCombinedCapabilitySet
@NotNull @NotNull ReadOnlyCapabilitySet getCombinedCapabilitySet(@NotNull @NotNull CapabilitySet agentCapabilitySet)
Gets a combined "effective" capabilitySet given an agent's capabilitySet. Will retrieve the shared capabilitySet for the agent based on theCapabilityScope
. The agent capabilitySet will override capabilities in theCapabilityScope.SHARED
capabilities if there's a precise key match.- Parameters:
agentCapabilitySet
-- Returns:
-
getCombinedCapabilitySet
ReadOnlyCapabilitySet getCombinedCapabilitySet(@NotNull @NotNull CapabilitySet agentCapabilitySet, @Nullable @Nullable CapabilitySet sharedCapabilitySet)
Gets a combined "effective" capabilitySet given an agent's capability set and a shared capability set The agent capabilitySet will override capabilities in theCapabilityScope.SHARED
capabilities if there's a precise key match.
-
getSystemCapabilityKeys
@NotNull @NotNull Collection<String> getSystemCapabilityKeys(@NotNull @NotNull String type, boolean isElasticEnabled)
Returns a list of Capability Keys that match the given type- Parameters:
type
- eg "builder" or "jdk"- Returns:
- list of capability keys eg. "system.builder.mvn2.Maven 2"
-
getSystemCapabilities
@NotNull @NotNull Collection<Capability> getSystemCapabilities(@NotNull @NotNull String type)
Collection ofCapability
which have keys prefixed with system.{type} Used to identify Bamboo system capabilities for Builders / JDKs.- Parameters:
type
-- Returns:
-
getSystemCapabilitiesByKey
@NotNull @NotNull Collection<Capability> getSystemCapabilitiesByKey(@NotNull @NotNull String key)
Collection ofCapability
which have the specified key- Parameters:
key
-- Returns:
-
findUniqueCapabilityKeys
@NotNull @NotNull List<String> findUniqueCapabilityKeys()
Finds all the distinct capability keys- Returns:
-
getPipelineDefinition
@Nullable @Nullable PipelineDefinition getPipelineDefinition(@NotNull @NotNull CapabilitySet capabilitySet)
-
getElasticImage
@Nullable @Nullable ElasticImageConfiguration getElasticImage(@NotNull @NotNull CapabilitySet capabilitySet)
-
-