Class PipelineManagerImpl
- java.lang.Object
-
- jetbrains.buildServer.pipeline.impl.PipelineManagerImpl
-
- All Implemented Interfaces:
PipelineManager
@Service public class PipelineManagerImpl extends Object implements PipelineManager
-
-
Constructor Summary
Constructors Constructor Description PipelineManagerImpl(ProjectManager projectManager, ProjectIdentifiersManager projectIdentifiersManager, OAuthConnectionsManager oAuthConnectionsManager, PipelineYamlParser pipelineYamlParser, VersionedSettingsManager versionedSettingsManager, VersionedSettingsConfigUpdater versionedSettingsConfigUpdater, VersionedSettingsUpdater versionedSettingsUpdater, VcsRootInstancesManagerEx vcsRootInstancesManager, SecurityContext securityContext, PipelineHeadManager headManager, YamlInProjectStorage yamlInProjectStorage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PipelinefindById(String id)PipelinefindByProject(SProject project)List<Pipeline>getAll(String parentProjectExtId)Returns all the pipelines stored under the given projectbooleanisPipeline(SProject project)voidremove(Pipeline pipeline)Pipelinesave(Pipeline pipeline, String parentProjectExtId)Save a new pipeline, or force the pipeline update without checking if its version is outdatedPipelinesave(Pipeline pipeline, String previousVersion, String parentProjectExtId)This implementation only works in single-node setup.
-
-
-
Constructor Detail
-
PipelineManagerImpl
public PipelineManagerImpl(@NotNull ProjectManager projectManager, @NotNull ProjectIdentifiersManager projectIdentifiersManager, @NotNull OAuthConnectionsManager oAuthConnectionsManager, @NotNull PipelineYamlParser pipelineYamlParser, @NotNull VersionedSettingsManager versionedSettingsManager, @NotNull VersionedSettingsConfigUpdater versionedSettingsConfigUpdater, @NotNull VersionedSettingsUpdater versionedSettingsUpdater, @NotNull VcsRootInstancesManagerEx vcsRootInstancesManager, @NotNull SecurityContext securityContext, @NotNull PipelineHeadManager headManager, @NotNull YamlInProjectStorage yamlInProjectStorage)
-
-
Method Detail
-
getAll
@NotNull public List<Pipeline> getAll(@Nullable String parentProjectExtId)
Description copied from interface:PipelineManagerReturns all the pipelines stored under the given project- Specified by:
getAllin interfacePipelineManager- Parameters:
parentProjectExtId- project to find pipelines in, or in Root porject if null- Returns:
- see above
-
findById
@Nullable public Pipeline findById(@NotNull String id)
- Specified by:
findByIdin interfacePipelineManager
-
findByProject
@Nullable public Pipeline findByProject(@NotNull SProject project)
- Specified by:
findByProjectin interfacePipelineManager
-
isPipeline
public boolean isPipeline(@NotNull SProject project)- Specified by:
isPipelinein interfacePipelineManager
-
save
public Pipeline save(@NotNull Pipeline pipeline, @Nullable String parentProjectExtId)
Description copied from interface:PipelineManagerSave a new pipeline, or force the pipeline update without checking if its version is outdated- Specified by:
savein interfacePipelineManager
-
save
public Pipeline save(@NotNull Pipeline pipeline, @NotNull String previousVersion, @Nullable String parentProjectExtId) throws OutdatedPipelineVersionException
This implementation only works in single-node setup.
In multinode setup, we need to somehow sync the pipeline versions between them One of the possible implementations is to keep a separate version on each node, and when applying the persist task, verify that the version is still relevant- Specified by:
savein interfacePipelineManager- Throws:
OutdatedPipelineVersionException
-
remove
public void remove(@NotNull Pipeline pipeline)- Specified by:
removein interfacePipelineManager
-
-