public interface BuildTypeSettings extends BuildTypeOptions, InheritableUserParametersHolder, DependencySettings, VcsLabelingSettings, CompatibleAgents
BuildTypeOptions.BuildConfigurationType
VcsLabelingSettings.LabelingType
BT_ALLOW_EXTERNAL_STATUS, BT_ALLOW_PERSONAL_BUILD_TRIGGERING, BT_ARTIFACT_PUBLISH_CONDITION, BT_ARTIFACT_RULES, BT_BRANCH_FILTER, BT_BUILD_CONFIGURATION_TYPE, BT_BUILD_DEFAULT_BRANCH, BT_BUILD_NUMBER_PATTERN, BT_CHECKOUT_DIR, BT_CHECKOUT_MODE, BT_CLEAN_BUILD, BT_EXCLUDE_DEFAULT_BRANCH_CHANGES, BT_EXECUTION_TIMEOUT, BT_FAIL_IF_TESTS_FAIL, BT_FAIL_ON_ANY_ERROR_MESSAGE, BT_FAIL_ON_EXIT_CODE, BT_FAIL_ON_OOME_OR_CRASH, BT_HANGING_BUILDS_DETECTION_ENABLED, BT_MAX_RUNNING_BUILDS, BT_SHOW_DEPS_CHANGES, DEFAULT_BUILD_NUMBER_PATTERN, DEFAULT_VCS_LABELING_BRANCH_FILTER, VCS_LABELING_BRANCH_FILTER
DEFAULT_LABEL_PATTERN
Modifier and Type | Method and Description |
---|---|
void |
addArtifactDependency(SArtifactDependency dependency)
Adds artifact dependency.
|
void |
addBuildFeature(SBuildFeatureDescriptor feature)
Adds build feature descriptor to this settings object.
|
SBuildFeatureDescriptor |
addBuildFeature(java.lang.String type,
java.util.Map<java.lang.String,java.lang.String> params)
Adds build feature with specified type and parameters to this settings object.
|
void |
addBuildParameter(Parameter parameter)
Adds build parameter to the configuration.
|
SBuildRunnerDescriptor |
addBuildRunner(BuildRunnerDescriptor runner)
Adds runner descriptor.
|
SBuildRunnerDescriptor |
addBuildRunner(java.lang.String name,
java.lang.String runnerType,
java.util.Map<java.lang.String,java.lang.String> parameters)
Creates new build runner and adds it to these settings.
|
boolean |
addBuildTrigger(BuildTriggerDescriptor triggerDescriptor)
Adds new trigger to build configuration settings.
|
BuildTriggerDescriptor |
addBuildTrigger(java.lang.String type,
java.util.Map<java.lang.String,java.lang.String> params)
Adds new trigger of specified type and with specified parameters to build configuration settings.
|
void |
addConfigParameter(Parameter param)
Adds configuration parameter.
|
void |
addRequirement(Requirement requirement)
Adds new build requirement to the configuration.
|
boolean |
addVcsRoot(SVcsRoot root)
Adds VCS root to the build configuration with default checkout rules.
|
void |
applyRunnersOrder(java.lang.String[] ids)
Accepts array of runner identifiers and reorders them according to this array.
|
boolean |
containsOwnVcsRoot(long vcsRootId)
Returns true if VCS root with specified id is attached directly and is not inherited via a template
|
boolean |
containsVcsRoot(long vcsRootId)
Returns true if VCS root with specified id is attached directly or is inherited via a template
|
SBuildFeatureDescriptor |
findBuildFeatureById(java.lang.String featureId)
Returns build feature with specified id
|
SBuildRunnerDescriptor |
findBuildRunnerById(java.lang.String runnerId)
Finds build runner by its' id
|
SBuildRunnerDescriptor |
findBuildRunnerByType(java.lang.String runnerType)
Finds build runner by its' type.
|
java.lang.String |
findRunnerParameter(java.lang.String paramName)
Searches runner parameter in all build runners and returns value of the first found parameter with given name.
|
BuildTriggerDescriptor |
findTriggerById(java.lang.String triggerId)
Finds build trigger descriptor by its' id
|
java.util.List<SArtifactDependency> |
getArtifactDependencies()
Returns artifacts this build configuration depending on.
|
java.lang.String |
getArtifactPaths()
Returns build artifact paths.
|
java.util.List<Requirement> |
getBuildFeatureRequirements()
Returns list of additional agent requirements imposed by configured enabled build features.
|
java.util.Collection<SBuildFeatureDescriptor> |
getBuildFeatures()
Returns build features added to this settings object.
|
java.util.Collection<SBuildFeatureDescriptor> |
getBuildFeaturesOfType(java.lang.String type)
Returns all build features of specified type.
|
java.lang.String |
getBuildNumberPattern()
Returns current build number pattern
|
java.lang.String |
getBuildParameter(java.lang.String key)
Returns build parameter by parameter key
|
java.util.Map<java.lang.String,java.lang.String> |
getBuildParameters()
Return map of build parameters specified by user.
|
java.util.Collection<Parameter> |
getBuildParametersCollection()
Returns build parameters collection.
|
java.util.List<SBuildRunnerDescriptor> |
getBuildRunners()
Returns collection of build runners attached to these settings
|
java.util.Collection<BuildTriggerDescriptor> |
getBuildTriggersCollection()
Returns collection of build trigger settings
|
java.lang.String |
getCheckoutDirectory()
Returns build checkout directory - if specified explicitly using
setCheckoutDirectory(String) . |
CheckoutRules |
getCheckoutRules(VcsRoot root)
Returns checkout rules configured for the specified VCS root.
|
BuildTypeDescriptor.CheckoutType |
getCheckoutType()
Returns method used by agent to retrieve project sources.
|
java.util.Map<java.lang.String,java.lang.String> |
getConfigParameters()
Returns map of configuration parameters
|
java.util.Collection<Parameter> |
getConfigParametersCollection()
Returns collection of configuration parameters.
|
java.util.List<Requirement> |
getImplicitRequirements()
Get list of non-satisfied implicit requirements for build agents.
|
SProject |
getProject()
Returns the project this build type entity belongs to.
|
java.util.List<Requirement> |
getRequirements()
Get list of explicit requirements for build agents which can run this build configuration.
|
BuildStepConditions |
getRunnerConditions(SBuildRunnerDescriptor descriptor) |
java.lang.String[] |
getRunnersOrder() |
java.util.Collection<java.lang.String> |
getRunnerTypes()
Returns types of the runners attached to these settings
|
java.util.List<Requirement> |
getRunTypeRequirements()
Returns list of additional agent requirements imposed by configured runners.
|
BuildTypeTemplate |
getTemplate()
Deprecated.
since 2017.2, use
getTemplates() instead |
java.lang.String |
getTemplateId()
Deprecated.
since 2017.2, use
getTemplateIds() instead |
java.util.List<java.lang.String> |
getTemplateIds()
Returns internal ids of the templates this settings are based on, including one of the default template
|
java.util.List<? extends BuildTypeTemplate> |
getTemplates()
Returns templates these settings are based on, including the default template.
|
<T> TypedValue<T> |
getTypedOption(Option<T> option)
Get option extended value.
|
java.util.List<java.lang.String> |
getUndefinedParameters()
Returns collection of parameter names (config and build params) referenced in the build configuration settings
but without values provided.
|
java.util.List<VcsRootEntry> |
getVcsRootEntries()
Returns all entries of vcs roots.
|
java.util.List<SVcsRoot> |
getVcsRoots()
Returns all roots currently attached to this configuration
|
boolean |
isCompositeBuildType() |
boolean |
isDeployment() |
boolean |
isEnabled(java.lang.String parametersDescriptorId)
Returns true if descriptor with specified id (runner, trigger or build feature) is enabled and false otherwise.
|
boolean |
isTemplateAccessible()
Checks accessibility of all attached templates, excluding the default template (if present)
|
boolean |
isTemplateBased()
Returns true if these settings are directly based on a template.
|
void |
persist()
Persists these settings.
|
void |
persist(ConfigAction cause) |
void |
removeAllBuildRunners()
Removes all build runners from these settings
|
void |
removeArtifactDependency(SArtifactDependency dependency)
Removes artifact dependency.
|
SBuildFeatureDescriptor |
removeBuildFeature(java.lang.String featureId)
Removes build feature with specified id from this settings object.
|
void |
removeBuildParameter(java.lang.String paramName)
Removes existing build parameter by its name.
|
SBuildRunnerDescriptor |
removeBuildRunner(java.lang.String runnerId)
Removes runner descriptor with specified id.
|
boolean |
removeBuildTrigger(BuildTriggerDescriptor triggerDescriptor)
Removes specified build trigger from the settings
|
void |
removeConfigParameter(java.lang.String paramName)
Removes configuration parameters with specified name
|
void |
removeRequirement(Requirement requirement)
Removes a requirement from the configuration.
|
void |
removeRequirement(java.lang.String parameterName)
Removes first requirement with the specified property name from the configuration.
|
boolean |
removeVcsRoot(SVcsRoot root)
Removes existing VCS root from the build configuration.
|
boolean |
replaceInValues(java.util.regex.Pattern regexpPattern,
java.lang.String replacement)
Replaces values according to specified pattern and replacement string in all
text parameters of the build configuration
|
boolean |
replaceInValues(java.lang.String regexp,
java.lang.String replacement)
Replaces values according to specified regexp and replacement string in all
text parameters of the build configuration
|
void |
resetRunnersOrder()
Resets custom runner order to default.
|
void |
setArtifactDependencies(java.util.List<SArtifactDependency> artifacts)
Sets artifacts this build configuration depending on.
|
void |
setArtifactPaths(java.lang.String artifactPaths)
Sets build artifact paths.
|
void |
setBuildNumberPattern(java.lang.String pattern)
Sets build number pattern.
|
void |
setCheckoutDirectory(java.lang.String dir)
Sets build checkout directory.
|
boolean |
setCheckoutRules(VcsRoot root,
CheckoutRules checkoutRules)
Sets checkout rules for specified VCS root.
|
void |
setCheckoutType(BuildTypeDescriptor.CheckoutType type)
Sets preferred checkout type for the configuration sources.
|
void |
setEnabled(java.lang.String parametersDescriptorId,
boolean enabled)
Enables or disables descriptor with specified id in build configuration settings.
|
boolean |
textValueMatches(java.util.regex.Pattern regexpPattern)
Returns true if configuration has value in text parameters which matches specified pattern.
|
boolean |
updateBuildFeature(java.lang.String featureId,
java.lang.String newType,
java.util.Map<java.lang.String,java.lang.String> newParams)
Updates build feature descriptor with specified id, changes type and parameters.
|
boolean |
updateBuildRunner(java.lang.String runnerId,
java.lang.String newName,
java.lang.String newType,
java.util.Map<java.lang.String,java.lang.String> newParams)
Updates parameters in the existing build runner descriptor.
|
boolean |
updateBuildTrigger(java.lang.String triggerId,
java.lang.String newType,
java.util.Map<java.lang.String,java.lang.String> newParams)
Updates build trigger descriptor with specified id, changes type and parameters.
|
getChangedOptions, getDeclaredOption, getOption, getOptionDefaultValue, getOptions, getOwnOptions, setOption
getInheritedParametersCollection, getOwnParameter, getOwnParameters, getOwnParametersCollection, getOwnParametersWithoutInheritedSpec, getParameters, getParametersCollection
addParameter, removeParameter
getParameter, getParameterValue
addDependency, getDependencies, removeDependency
getLabelingRoots, getLabelingType, getLabelPattern
getAgentCompatibility, getCompatibilityMap, getCompatibleAgents
@NotNull SProject getProject()
@NotNull java.util.Collection<java.lang.String> getRunnerTypes()
@NotNull java.util.List<Requirement> getRunTypeRequirements()
@NotNull java.util.List<Requirement> getBuildFeatureRequirements()
@NotNull SBuildRunnerDescriptor addBuildRunner(@NotNull BuildRunnerDescriptor runner)
BuildRunnerDescriptorFactory
to create instance of runner descriptor.
SBuildRunnerDescriptor
as parameterrunner
- descriptor@NotNull SBuildRunnerDescriptor addBuildRunner(@NotNull java.lang.String name, @NotNull java.lang.String runnerType, @NotNull java.util.Map<java.lang.String,java.lang.String> parameters)
name
- runner namerunnerType
- type of the runnerparameters
- runner parameters@Nullable SBuildRunnerDescriptor removeBuildRunner(@NotNull java.lang.String runnerId)
runnerId
- descriptor idboolean updateBuildRunner(@NotNull java.lang.String runnerId, @NotNull java.lang.String newName, @NotNull java.lang.String newType, @NotNull java.util.Map<java.lang.String,java.lang.String> newParams)
runnerId
- id of runner descriptornewName
- new runner namenewType
- new type of the runnernewParams
- new runner parameters@NotNull java.util.List<SBuildRunnerDescriptor> getBuildRunners()
void removeAllBuildRunners()
@Nullable java.lang.String[] getRunnersOrder()
void applyRunnersOrder(@NotNull java.lang.String[] ids)
ids
- runner identifiersvoid resetRunnersOrder()
@Nullable SBuildRunnerDescriptor findBuildRunnerByType(@NotNull java.lang.String runnerType)
runnerType
- type of the runner@Nullable SBuildRunnerDescriptor findBuildRunnerById(@NotNull java.lang.String runnerId)
runnerId
- id of the runner@Nullable java.lang.String findRunnerParameter(@NotNull java.lang.String paramName)
paramName
- name of the parameter@NotNull BuildStepConditions getRunnerConditions(@NotNull SBuildRunnerDescriptor descriptor)
@NotNull java.util.Map<java.lang.String,java.lang.String> getBuildParameters()
@NotNull java.util.Collection<Parameter> getBuildParametersCollection()
void addBuildParameter(Parameter parameter)
Constants.SYSTEM_PREFIX
for system properties
and Constants.ENV_PREFIX
for environment variable.parameter
- specified parameter.void removeBuildParameter(java.lang.String paramName)
paramName
- specified parameter name.java.lang.String getBuildParameter(java.lang.String key)
key
- parameter key@NotNull java.util.List<SVcsRoot> getVcsRoots()
boolean addBuildTrigger(@NotNull BuildTriggerDescriptor triggerDescriptor)
BuildTriggerDescriptorFactory
to create trigger descriptor.triggerDescriptor
- trigger descriptor@NotNull BuildTriggerDescriptor addBuildTrigger(@NotNull java.lang.String type, @NotNull java.util.Map<java.lang.String,java.lang.String> params)
type
- type of the triggerparams
- parameters mapboolean removeBuildTrigger(@NotNull BuildTriggerDescriptor triggerDescriptor)
triggerDescriptor
- trigger descriptorboolean updateBuildTrigger(@NotNull java.lang.String triggerId, @NotNull java.lang.String newType, @NotNull java.util.Map<java.lang.String,java.lang.String> newParams)
triggerId
- id of build trigger descriptornewType
- type of build trigger descriptornewParams
- parameters map@NotNull java.util.Collection<BuildTriggerDescriptor> getBuildTriggersCollection()
@Nullable BuildTriggerDescriptor findTriggerById(@NotNull java.lang.String triggerId)
triggerId
- id of the triggervoid setCheckoutType(BuildTypeDescriptor.CheckoutType type)
BuildTypeDescriptor.CheckoutType.ON_SERVER
- checkout sources automatically on the server and snd it to the agent.
BuildTypeDescriptor.CheckoutType.ON_AGENT
- checkout sources automatically on the agent.
BuildTypeDescriptor.CheckoutType.MANUAL
- do not check out sources automatically.type
- new checkout type.@NotNull BuildTypeDescriptor.CheckoutType getCheckoutType()
setCheckoutType(jetbrains.buildServer.BuildTypeDescriptor.CheckoutType)
void setCheckoutDirectory(@Nullable java.lang.String dir)
dir
- checkout directory@Nullable java.lang.String getCheckoutDirectory()
Returns build checkout directory - if specified explicitly using setCheckoutDirectory(String)
. Returns null
if default checkout directory,
generated by TeamCity should be used.
setCheckoutDirectory(String)
void setArtifactPaths(@Nullable java.lang.String artifactPaths)
artifactPaths
- paths to build artifacts@Nullable java.lang.String getArtifactPaths()
@NotNull java.util.List<SArtifactDependency> getArtifactDependencies()
void setArtifactDependencies(@NotNull java.util.List<SArtifactDependency> artifacts)
artifacts
- new artifacts dependency list.void addArtifactDependency(@NotNull SArtifactDependency dependency)
dependency
- new artifact dependencyvoid removeArtifactDependency(@NotNull SArtifactDependency dependency)
dependency
- artifact dependencyboolean containsVcsRoot(long vcsRootId)
vcsRootId
- id of VCS rootboolean containsOwnVcsRoot(long vcsRootId)
vcsRootId
- id of VCS root@NotNull java.util.List<VcsRootEntry> getVcsRootEntries()
boolean addVcsRoot(@NotNull SVcsRoot root) throws InvalidVcsRootScopeException, VcsRootNotFoundException
root
- VCS root to addInvalidVcsRootScopeException
- if VCS root scope is local and corresponds to another project (not the project - owner of this build configuration)VcsRootNotFoundException
- if specified VCS root does not exist anymoreboolean removeVcsRoot(@NotNull SVcsRoot root)
root
- VCS root to removeboolean setCheckoutRules(@NotNull VcsRoot root, @NotNull CheckoutRules checkoutRules)
root
- root to set rules forcheckoutRules
- checkout rules for the VCS rootCheckoutRules getCheckoutRules(@NotNull VcsRoot root)
root
- VCS rootvoid addConfigParameter(@NotNull Parameter param)
addBuildParameter(Parameter)
), these parameters must have prefix system. or env.
param
- configuration parametervoid removeConfigParameter(@NotNull java.lang.String paramName)
paramName
- parameter name@NotNull java.util.Collection<Parameter> getConfigParametersCollection()
@NotNull java.util.Map<java.lang.String,java.lang.String> getConfigParameters()
@NotNull java.util.List<java.lang.String> getUndefinedParameters()
boolean isTemplateBased()
@NotNull java.util.List<? extends BuildTypeTemplate> getTemplates()
@Deprecated @Nullable BuildTypeTemplate getTemplate()
getTemplates()
insteadboolean isTemplateAccessible()
@NotNull java.util.List<java.lang.String> getTemplateIds()
@Nullable @Deprecated java.lang.String getTemplateId()
getTemplateIds()
instead@NotNull java.util.List<Requirement> getRequirements()
@NotNull java.util.List<Requirement> getImplicitRequirements()
void addRequirement(@NotNull Requirement requirement)
requirement
- new requirement.void removeRequirement(java.lang.String parameterName)
parameterName
- name of the requirement parameter.void removeRequirement(Requirement requirement)
requirement
- requirement to be removed@NotNull java.lang.String getBuildNumberPattern()
void setBuildNumberPattern(@NotNull java.lang.String pattern)
pattern
- pattern to setvoid persist()
void persist(@NotNull ConfigAction cause) throws PersistFailedException
PersistFailedException
boolean replaceInValues(@NotNull java.lang.String regexp, @NotNull java.lang.String replacement) throws java.util.regex.PatternSyntaxException
regexp
- regexpreplacement
- replacementjava.util.regex.PatternSyntaxException
- if pattern is incorrectboolean replaceInValues(@NotNull java.util.regex.Pattern regexpPattern, @NotNull java.lang.String replacement)
regexpPattern
- regexp patternreplacement
- replacementboolean textValueMatches(@NotNull java.util.regex.Pattern regexpPattern)
regexpPattern
- regexp pattern@NotNull SBuildFeatureDescriptor addBuildFeature(@NotNull java.lang.String type, @NotNull java.util.Map<java.lang.String,java.lang.String> params)
type
- build feature typeparams
- build feature parametersvoid addBuildFeature(@NotNull SBuildFeatureDescriptor feature)
feature
- build feature descriptor@NotNull java.util.Collection<SBuildFeatureDescriptor> getBuildFeatures()
@NotNull java.util.Collection<SBuildFeatureDescriptor> getBuildFeaturesOfType(@NotNull java.lang.String type)
@Nullable SBuildFeatureDescriptor removeBuildFeature(@NotNull java.lang.String featureId)
featureId
- id of the featureboolean updateBuildFeature(@NotNull java.lang.String featureId, @NotNull java.lang.String newType, @NotNull java.util.Map<java.lang.String,java.lang.String> newParams)
featureId
- id of build feature descriptornewType
- type of build feature descriptornewParams
- parameters map@Nullable SBuildFeatureDescriptor findBuildFeatureById(@NotNull java.lang.String featureId)
featureId
- id of the featurevoid setEnabled(@NotNull java.lang.String parametersDescriptorId, boolean enabled)
parametersDescriptorId
- id of build runner, trigger or build featureenabled
- true to enable, false to disableboolean isEnabled(@NotNull java.lang.String parametersDescriptorId)
parametersDescriptorId
- id of build runner, trigger or build feature@NotNull <T> TypedValue<T> getTypedOption(@NotNull Option<T> option)
Get option extended value. See TypedValue
.
When the option is not defined in this Settings TypedValue will contain null in getValue()
boolean isDeployment()
boolean isCompositeBuildType()