Package com.polarion.alm.builder
Interface IBuilderService
public interface IBuilderService
Builder service.
- Author:
- Stepan Roh, Polarion Software
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of job coupled withrunCleanJob(String).static final StringdefaultIBuildDescriptornamestatic final StringdefaultICalculationDescriptornamestatic final Stringdefault local deployment space namestatic final StringName of job coupled withrunBuild(IBuildArtifact, String, String, String, String, Properties). -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckIsBuildRunning(IBuild build) Returns true if the build is still runningfindBuildArtifacts(IBuildArtifactSelector selector) Return all build artifacts matching givenIBuildArtifactSelector.voidforceConfigurationReload(IGroupEntity groupEntity) Forces configuration reload and build artifacts auto-recognition (if configured) for given group entity.Return associated build artifact engineer repository.getBuildArtifactForGroupEntity(IGroupEntity groupEntity) Return build artifact representing given group entity (project or project group).Return associated build artifact recognizer repository.getBuildArtifactsForProject(IProject project) Return build artifacts for given project.Return associated build extender repository.Get build information repository where all builds are stored.Return all available builds (in any state).getBuilds(IBuildArtifact artifact) Return all available builds for given artifact (in any state).Return all available builds for given project (in any state).getJobForBuild(IBuild build) Return master job associated with given build.Get reports repository.getRunningBuildJob(IBuildArtifact artifact, String buildDescriptorName, String calculationDescriptorName) isBuildRunning(IBuildArtifact artifact, String buildDescriptorName, String calculationDescriptorName) Deprecated.queryBuilds(IBuildArtifact artifact, String query, String sort) Return all builds (in any state) for given artifact using query and sort criteria.queryBuilds(IProject project, String query, String sort) Return all builds (in any state) for given project using query and sort criteria.queryBuilds(String query, String sort) Return all builds (in any state) using query and sort criteria.voidremoveFinishedBuild(IBuild build) Removes finished build fromIBuildInformationRepository.runBuild(IBuildArtifact artifact, String buildDescriptorName, String calculationDescriptorName, String buildTag, String localDeploymentSpaceName, Properties properties) Run build.runCleanJob(String localDeploymentSpaceName) Run clean job on given local deployment space.
-
Field Details
-
DEFAULT_BUILD_DESCRIPTOR_NAME
defaultIBuildDescriptorname- See Also:
-
DEFAULT_CALCULATION_DESCRIPTOR_NAME
defaultICalculationDescriptorname- See Also:
-
DEFAULT_LOCAL_DEPLOYMENT_SPACE
default local deployment space name- See Also:
-
MASTER_BUILD_JOB_NAME
Name of job coupled withrunBuild(IBuildArtifact, String, String, String, String, Properties). See alsoIMasterBuildJobUnit.- See Also:
-
CLEAN_JOB_NAME
Name of job coupled withrunCleanJob(String). See alsoICleanJobUnit.- See Also:
-
-
Method Details
-
getBuildArtifactsForProject
Return build artifacts for given project.Project's own build artifact (see
getBuildArtifactForGroupEntity(IGroupEntity)) is not amongst returned artifacts.- Parameters:
project- project- Returns:
IPObjectListofIBuildArtifacts (notnull)- Throws:
IllegalArgumentException- if project isnull
-
getBuildArtifactForGroupEntity
Return build artifact representing given group entity (project or project group).- Parameters:
groupEntity- group entity- Returns:
- build artifact (not
null) - Throws:
IllegalArgumentException- if groupEntity isnull
-
findBuildArtifacts
Return all build artifacts matching givenIBuildArtifactSelector.Will return
getBuildArtifactForGroupEntity(IGroupEntity)if it matches given selector.- Parameters:
selector- selector- Returns:
IPObjectListofIBuildArtifacts (notnull)- Throws:
IllegalArgumentException- if selector isnull
-
runBuild
IBuild runBuild(IBuildArtifact artifact, String buildDescriptorName, String calculationDescriptorName, String buildTag, String localDeploymentSpaceName, Properties properties) throws GenericBuilderException Run build.If build tag is supplied, it is used instead of
IBuildDescriptor.getBuildTag().This is a shortcut for invocation of job
MASTER_BUILD_JOB_NAMEand finding properIBuildinstance.- Parameters:
artifact- artifactbuildDescriptorName- build descriptor name (useDEFAULT_BUILD_DESCRIPTOR_NAMEfor default andnullfor skipping the build phase)calculationDescriptorName- build descriptor name (useDEFAULT_CALCULATION_DESCRIPTOR_NAMEfor default andnullfor skipping the calculation phase)buildTag- build tag (may benull)localDeploymentSpaceName- name of local deployment space (useDEFAULT_LOCAL_DEPLOYMENT_SPACEfor default integration build andnullfor standalone build)properties- additional build/calculation properties (can benull)- Returns:
IBuildrepresenting running (or at least scheduled) build- Throws:
IllegalArgumentException- if artifact isnullGenericBuilderException- if something goes wrong or build is not defined
-
isBuildRunning
@Deprecated IBuild isBuildRunning(IBuildArtifact artifact, String buildDescriptorName, String calculationDescriptorName) Deprecated. -
getRunningBuildJob
IJob getRunningBuildJob(IBuildArtifact artifact, String buildDescriptorName, String calculationDescriptorName) - Parameters:
artifact- artifactbuildDescriptorName- build descriptor namecalculationDescriptorName- build descriptor name- Returns:
- job or null if there is no running or waiting build with given buildDescriptorName or calculationDescriptorName
- Throws:
IllegalArgumentException- if artifact isnull- Since:
- 3.7.3
-
runCleanJob
Run clean job on given local deployment space.It is permitted to try to clean up missing deployment space.
- Parameters:
localDeploymentSpaceName- name of local deployment space (useDEFAULT_LOCAL_DEPLOYMENT_SPACEfor default integration build (null(standalone space) is not permitted)- Returns:
- scheduled job (not
null) - Throws:
IllegalArgumentException- if localDeploymentSpaceName isnullGenericBuilderException- if something goes wrong- See Also:
-
getBuildInformationRepository
IBuildInformationRepository getBuildInformationRepository()Get build information repository where all builds are stored.- Returns:
IBuildInformationRepositoryinstance (notnull)
-
getReportsRepository
IReportsRepository getReportsRepository()Get reports repository.- Returns:
IReportsRepositoryinstance (notnull)
-
getBuilds
IPObjectList<IBuild> getBuilds()Return all available builds (in any state).- Returns:
IPObjectListofIBuilds (notnull)
-
getBuilds
Return all available builds for given project (in any state).- Parameters:
project- project to list builds for- Returns:
IPObjectListofIBuilds (notnull)- Throws:
IllegalArgumentException- if project isnull
-
getBuilds
Return all available builds for given artifact (in any state).- Parameters:
artifact- artifact to list builds for- Returns:
IPObjectListofIBuilds (notnull)- Throws:
IllegalArgumentException- if artifact isnull
-
queryBuilds
Return all builds (in any state) using query and sort criteria.- Parameters:
query-sort- the format is same as forIIndexSearch.sort(String)- Returns:
IPObjectListofIBuilds (notnull)
-
queryBuilds
Return all builds (in any state) for given project using query and sort criteria.- Parameters:
project- project to list builds forquery-sort- the format is same as forIIndexSearch.sort(String)- Returns:
IPObjectListofIBuilds (notnull)- Throws:
IllegalArgumentException- if project isnull
-
queryBuilds
Return all builds (in any state) for given artifact using query and sort criteria.- Parameters:
artifact- artifact to list builds forquery-sort- the format is same as forIIndexSearch.sort(String)- Returns:
IPObjectListofIBuilds (notnull)- Throws:
IllegalArgumentException- if artifact isnull
-
removeFinishedBuild
Removes finished build fromIBuildInformationRepository.- Parameters:
build- build to remove from BIR- Throws:
IllegalArgumentException- if build isnullIllegalStateException- if build is not finished
-
getJobForBuild
Return master job associated with given build.- Parameters:
build- build- Returns:
- associated job or
nullif job was already removed - Throws:
IllegalArgumentException- if build isnull
-
forceConfigurationReload
Forces configuration reload and build artifacts auto-recognition (if configured) for given group entity.- Parameters:
groupEntity- group entity- Throws:
GenericBuilderException- if something goes wrongIllegalArgumentException- if groupEntity isnull
-
getBuildArtifactEngineerRepository
IBuildArtifactEngineerRepository getBuildArtifactEngineerRepository()Return associated build artifact engineer repository.Part of service provider interface (SPI).
- Returns:
- repository (not
null)
-
getBuildArtifactRecognizerRepository
IBuildArtifactRecognizerRepository getBuildArtifactRecognizerRepository()Return associated build artifact recognizer repository.Part of service provider interface (SPI).
- Returns:
- repository (not
null)
-
getBuildExtenderRepository
IBuildExtenderRepository getBuildExtenderRepository()Return associated build extender repository.- Returns:
- build extender repository (not
null)
-
getBuildsPolicy
IBuildsPolicy getBuildsPolicy()- Since:
- 3.7.3
-
checkIsBuildRunning
Returns true if the build is still running- Parameters:
build-- Since:
- 3.7.3
-
getRunningBuildJob(IBuildArtifact, String, String)