Interface ExecutableAgentsMatrix
- All Known Implementing Classes:
ExecutableAgentsMatrixImpl
public interface ExecutableAgentsMatrix
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBuildAgent
(@NotNull BuildAgent buildAgent) Record an agent matching ALL requirementsvoid
addBuildAgents
(@NotNull Collection<BuildAgent> buildAgents) Record a collection of agents matching ALL requirementsvoid
addDedicatedNonMatchingBuildAgent
(@NotNull BuildAgent buildAgent) Record build agent dedicated to the job/plan/project but not satisfying all requirementsvoid
addDedicatedNonMatchingEphemeralTemplate
(@NotNull EphemeralAgentTemplate template) Record an ephemeral template dedicated to the job/plan/project but not satisfying all requirementsvoid
addDedicatedNonMatchingImage
(@NotNull ElasticImageConfiguration elasticImageConfiguration) Record image configuration dedicated to the job/plan/project but not satisfying all requirementsvoid
addEphemeralTemplateMatch
(@NotNull EphemeralAgentTemplate ephemeralAgentTemplate) Record an ephemeral template that matches all requirementsvoid
addEphemeralTemplateToMatrix
(@NotNull String requirementKey, @NotNull EphemeralAgentTemplate template) Record an ephemeral template matching a requirement.void
addImageMatch
(@NotNull ElasticImageConfiguration imageMatch) Record an image that matches all requirementsvoid
addImageToMatrix
(@NotNull String requirementKey, @NotNull ElasticImageConfiguration image) Record an image matching a requirement.boolean
addRequirementIfNoMatches
(@NotNull ImmutableRequirement requirement) Record a requirement if it does not have any matching agent, image or ephemeral template.void
addRequirementWithNoAgentMatch
(@NotNull ImmutableRequirement requirement) Deprecated.since 9.3 no longer using separate collections for each unmatched agent type.void
addRequirementWithNoImageMatch
(@NotNull ImmutableRequirement requirement) Deprecated.since 9.3 no longer using separate collections for each unmatched agent type.@NotNull SortedSet<BuildAgent>
Get a set of agents that match ALL requirements.@NotNull Collection<BuildAgent>
getBuildAgents
(@NotNull String requirementKey) @NotNull SortedSet<BuildAgent>
@NotNull List<ElasticImageConfiguration>
@NotNull List<EphemeralAgentTemplate>
Get a set of ephemeral templates that match ALL requirements.@NotNull Collection<EphemeralAgentTemplate>
getEphemeralTemplatesFromMatrix
(@NotNull String requirementKey) @NotNull Collection<ElasticImageConfiguration>
getImageFromMatrix
(@NotNull String requirementKey) @NotNull List<ElasticImageConfiguration>
Get a set of elastic images that match ALL requirements.@NotNull Collection<BuildAgent>
Get a set of agents that match ALL requirements AND are currently enabled and online.int
@NotNull Set<ImmutableRequirement>
Retrieve a list of all requirements which were not matched by any agent or image.boolean
Checks whether the executable uses the docker configuration.boolean
Check if elastic support is enabledboolean
void
put
(@NotNull String requirementKey, @NotNull BuildAgent agent) Record an agent matching a requirement.void
setElasticBambooEnabled
(boolean elasticBambooEnabled) Mark whether elastic support is enabled or notvoid
setEphemeralTemplatesEnabled
(boolean ephemeralTemplatesEnabled) void
setRequirementCount
(int requirementCount) void
setUsesDockerConfiguration
(boolean usesDockerConfiguration) Sets whether the executable uses the docker configuration.
-
Method Details
-
addBuildAgent
Record an agent matching ALL requirements- Parameters:
buildAgent
- that matches
-
addBuildAgents
Record a collection of agents matching ALL requirements- Parameters:
buildAgents
- that match
-
addImageMatch
Record an image that matches all requirements- Parameters:
imageMatch
- image that matches
-
addImageToMatrix
void addImageToMatrix(@NotNull @NotNull String requirementKey, @NotNull @NotNull ElasticImageConfiguration image) Record an image matching a requirement. May also get recorded to match all requirements- Parameters:
requirementKey
- for requirement that matchesimage
- that matches
-
put
Record an agent matching a requirement. May also get recorded to match all requirements- Parameters:
requirementKey
- of requirement matchedagent
- that matches
-
getBuildAgents
Get a set of agents that match ALL requirements. i.e. these agents could build the executable. Includes offline and disabled agents- Returns:
- a set of agents that match all requirements.
-
getBuildAgents
- Parameters:
requirementKey
- of requirement- Returns:
- a collection of agents that match a single requirement
-
getImageMatches
Get a set of elastic images that match ALL requirements. i.e. these images could build the executable.- Returns:
- a list of images that match all requirements.
-
getImageFromMatrix
@NotNull @NotNull Collection<ElasticImageConfiguration> getImageFromMatrix(@NotNull @NotNull String requirementKey) - Parameters:
requirementKey
- of requirement- Returns:
- a collection of images that match a single requirement
-
getOnlineEnabledBuildAgents
Get a set of agents that match ALL requirements AND are currently enabled and online. i.e. these agents could build the executable now- Returns:
- set of online enabled build agents that match all requirements
-
addRequirementWithNoAgentMatch
Deprecated.since 9.3 no longer using separate collections for each unmatched agent type. Use#addRequirementWithNoMatches(ImmutableRequirement)
insteadRecord a requirement that does not have any matching agents.- Parameters:
requirement
- that didn't have a match
-
addRequirementWithNoImageMatch
Deprecated.since 9.3 no longer using separate collections for each unmatched agent type. Use#addRequirementWithNoMatches(ImmutableRequirement)
insteadRecord a requirement that does not have any matching image.- Parameters:
requirement
- that didn't have a match
-
getRequirementsWithNoMatches
Retrieve a list of all requirements which were not matched by any agent or image. If elastic capability is disabled it will ignore images and just look at agent matches.- Returns:
- Set of requirements with no matches
-
setElasticBambooEnabled
void setElasticBambooEnabled(boolean elasticBambooEnabled) Mark whether elastic support is enabled or not- Parameters:
elasticBambooEnabled
- whether elastic bamboo is enabled
-
isElasticBambooEnabled
boolean isElasticBambooEnabled()Check if elastic support is enabled- Returns:
- true if elastic bamboo is enabled, otherwise false
-
isEphemeralTemplatesEnabled
boolean isEphemeralTemplatesEnabled()- Since:
- 9.3
-
setEphemeralTemplatesEnabled
void setEphemeralTemplatesEnabled(boolean ephemeralTemplatesEnabled) - Since:
- 9.3
-
getRequirementCount
int getRequirementCount()- Returns:
- How many requirements were used to generate this matrix
-
setRequirementCount
void setRequirementCount(int requirementCount) - Parameters:
requirementCount
- How many requirements were used to generate this matrix
-
addDedicatedNonMatchingImage
void addDedicatedNonMatchingImage(@NotNull @NotNull ElasticImageConfiguration elasticImageConfiguration) Record image configuration dedicated to the job/plan/project but not satisfying all requirements- Parameters:
elasticImageConfiguration
-
-
addDedicatedNonMatchingBuildAgent
Record build agent dedicated to the job/plan/project but not satisfying all requirements- Parameters:
buildAgent
-
-
getDedicatedNonMatchingBuildAgents
- Returns:
- set of dedicated agents that don't match all requirements
-
getDedicatedNonMatchingImages
- Returns:
- list of dedicated images that don't match all requirements
-
addEphemeralTemplateMatch
Record an ephemeral template that matches all requirements- Parameters:
ephemeralAgentTemplate
- ephemeral template that matches- Since:
- 9.3
-
getEphemeralTemplateMatches
Get a set of ephemeral templates that match ALL requirements. i.e. these templates could build the executable.- Returns:
- a list of ephemeral templates that match all requirements.
-
addEphemeralTemplateToMatrix
void addEphemeralTemplateToMatrix(@NotNull @NotNull String requirementKey, @NotNull @NotNull EphemeralAgentTemplate template) Record an ephemeral template matching a requirement. May also get recorded to match all requirements- Parameters:
requirementKey
- for requirement that matchestemplate
- that matches- Since:
- 9.3
-
getEphemeralTemplatesFromMatrix
@NotNull @NotNull Collection<EphemeralAgentTemplate> getEphemeralTemplatesFromMatrix(@NotNull @NotNull String requirementKey) - Parameters:
requirementKey
- of requirement- Returns:
- a collection of ephemeral templates that match a single requirement
- Since:
- 9.3
-
addRequirementIfNoMatches
Record a requirement if it does not have any matching agent, image or ephemeral template.- Parameters:
requirement
- that didn't have a match- Since:
- 9.3
-
getDedicatedNonMatchingEphemeralTemplates
List<EphemeralAgentTemplate> getDedicatedNonMatchingEphemeralTemplates()- Returns:
- list of dedicated ephemeral templates that don't match all the requirements
- Since:
- 9.3
-
addDedicatedNonMatchingEphemeralTemplate
Record an ephemeral template dedicated to the job/plan/project but not satisfying all requirements- Since:
- 9.3
-
getUsesDockerConfiguration
boolean getUsesDockerConfiguration()Checks whether the executable uses the docker configuration.- Since:
- 9.3
-
setUsesDockerConfiguration
void setUsesDockerConfiguration(boolean usesDockerConfiguration) Sets whether the executable uses the docker configuration.- Since:
- 9.3
-