Class BuildChain
- java.lang.Object
-
- jetbrains.buildServer.serverSide.dependency.BuildChain
-
- All Implemented Interfaces:
Comparable<BuildChain>
public class BuildChain extends Object implements Comparable<BuildChain>
-
-
Constructor Summary
Constructors Constructor Description BuildChain(Collection<SBuildType> topBuildTypes, Collection<? extends BuildPromotion> topPromotions, ProjectManager projectManager, VcsModificationHistory vcsHistory, ChangesCalculationOptionsFactoryEx changesCalculationOptionsFactory)
-
Method Summary
-
-
-
Constructor Detail
-
BuildChain
public BuildChain(@NotNull Collection<SBuildType> topBuildTypes, @NotNull Collection<? extends BuildPromotion> topPromotions, @NotNull ProjectManager projectManager, @NotNull VcsModificationHistory vcsHistory, @NotNull ChangesCalculationOptionsFactoryEx changesCalculationOptionsFactory)
-
-
Method Detail
-
getLatestTopPromotion
@Nullable public BuildPromotion getLatestTopPromotion()
- Returns:
- the latest top build promotion of this build chain or null, if chain does not have build promotions
-
getId
@NotNull public String getId()
-
getTopBuildTypes
@NotNull public List<SBuildType> getTopBuildTypes()
-
getTopBuildPromotions
@NotNull public Map<String,BuildPromotionEx> getTopBuildPromotions()
-
getChanges
@NotNull public List<ChangeDescriptor> getChanges()
-
getChainBuildTypes
@NotNull public Set<SBuildType> getChainBuildTypes()
- Returns:
- all build chain build types.
-
getNotFinishedChainBuildTypes
@NotNull public Set<SBuildType> getNotFinishedChainBuildTypes()
- Returns:
- all build types of the chain with running queued or not yet started builds.
-
getTriggeredChainBuildTypes
@NotNull public Set<SBuildType> getTriggeredChainBuildTypes()
- Returns:
- all build types of the chain where queued or started build exists.
-
getReifiedDependencies
@NotNull public Collection<BuildPromotion> getReifiedDependencies(@NotNull SBuildType bt)
For a given build configuration returns all promotions from the chain this build configuration depends on directly or transitively- Parameters:
bt
-- Returns:
-
getChainModificationId
@Nullable public Long getChainModificationId()
-
isPersonal
public boolean isPersonal()
-
getAllPromotions
@NotNull public Collection<BuildPromotion> getAllPromotions()
-
getAllPromotionsMap
@NotNull public Map<String,BuildPromotion> getAllPromotionsMap()
-
getCanStart
@NotNull public Map<String,Collection<BuildPromotion>> getCanStart()
-
containsTriggeredBuild
public boolean containsTriggeredBuild(@NotNull SBuildType buildType)
- Parameters:
buildType
-- Returns:
- true if build chain contains queued or started build for the specified build configuration
-
containsBuildPromotion
public boolean containsBuildPromotion(@NotNull BuildPromotion promotion)
-
getReusedBuildPromotions
@NotNull public Collection<BuildPromotion> getReusedBuildPromotions()
- Returns:
- collection of build promotions which were reused. Reused build promotions are calculated as those which have a started build and their start time is before top promotions queued time. In addition these builds should participate in more than one build chain.
-
traverseDependedOn
public void traverseDependedOn(@NotNull SBuildType startFrom, @NotNull DependencyConsumer<BuildTypeEx> consumer)
Traverses all build types having direct and indirect dependencies on startFrom build type. Note, this method does not use only settings of the build configuration, because settings may not correspond to actual dependencies in build promotions. So the method traverses both: settings and build promotions dependencies.- Parameters:
startFrom
-consumer
-
-
setPreviousId
public void setPreviousId(@NotNull String prevId)
-
getPreviousId
@NotNull public String getPreviousId()
-
compareTo
public int compareTo(BuildChain o)
- Specified by:
compareTo
in interfaceComparable<BuildChain>
-
-