Package jetbrains.buildServer.serverSide
Class AbstractBuildSettings
- java.lang.Object
-
- jetbrains.buildServer.serverSide.AbstractBuildSettings
-
- All Implemented Interfaces:
BuildSettings
,ReadOnlyBuildSettings
,ReadOnlyUserParameters
- Direct Known Subclasses:
ExtensibleBuildSettings
public abstract class AbstractBuildSettings extends Object implements BuildSettings
Provides information about build settings. Read-only.- Since:
- 7.0
- Author:
- Leonid.Bushuev
-
-
Field Summary
Fields Modifier and Type Field Description static String
ALLOW_ANY_CHARS_KEY
static Set<String>
ALWAYS_AVAILABLE_PARAMETERS
protected Filter<SArtifactDependency>
ENABLED_ARTIFACT_DEPENDENCIES_FILTER
protected Filter<Requirement>
ENABLED_REQUIREMENTS_FILTER
protected Filter<ParametersDescriptor>
ENABLED_SETTINGS_FILTER
static String
TEAMCITY_INTERNAL_PARAMETER_PREFIX
-
Constructor Summary
Constructors Constructor Description AbstractBuildSettings()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.ReadOnlyBuildSettings
getParametersProvider
-
-
-
-
Field Detail
-
TEAMCITY_INTERNAL_PARAMETER_PREFIX
public static final String TEAMCITY_INTERNAL_PARAMETER_PREFIX
- See Also:
- Constant Field Values
-
ALLOW_ANY_CHARS_KEY
public static final String ALLOW_ANY_CHARS_KEY
- See Also:
- Constant Field Values
-
ENABLED_SETTINGS_FILTER
protected final Filter<ParametersDescriptor> ENABLED_SETTINGS_FILTER
-
ENABLED_ARTIFACT_DEPENDENCIES_FILTER
protected final Filter<SArtifactDependency> ENABLED_ARTIFACT_DEPENDENCIES_FILTER
-
ENABLED_REQUIREMENTS_FILTER
protected final Filter<Requirement> ENABLED_REQUIREMENTS_FILTER
-
-
Method Detail
-
getVcsRootEntries
@NotNull public List<VcsRootEntry> getVcsRootEntries()
Description copied from interface:ReadOnlyBuildSettings
Returns VCS root entries associated with this build, i.e. build configuration VCS root entries on the moment of build starting.- Specified by:
getVcsRootEntries
in interfaceReadOnlyBuildSettings
- Returns:
- see above
-
getCheckoutType
@NotNull public BuildTypeDescriptor.CheckoutType getCheckoutType()
Description copied from interface:ReadOnlyBuildSettings
Returns method used by agent to retrieve project sources. CheckoutType.ON_SERVER server creates patch and sends it to agent CheckoutType.ON_AGENT agent checks sources out CheckoutType.MANUAL script does it itself. This method returns actual checkout type, which may differ from the value set by#setCheckoutType(BuildTypeDescriptor.CheckoutType)
- Specified by:
getCheckoutType
in interfaceReadOnlyBuildSettings
- Returns:
- method to get sources on agent.
-
getCheckoutDirectory
@Nullable public String getCheckoutDirectory()
Description copied from interface:ReadOnlyBuildSettings
Returns build checkout directory - if specified explicitly. Returns null if default checkout directory, generated by TeamCity should be used.- Specified by:
getCheckoutDirectory
in interfaceReadOnlyBuildSettings
- Returns:
- build checkout directory
-
getArtifactDependencies
@NotNull public List<SArtifactDependency> getArtifactDependencies()
- Specified by:
getArtifactDependencies
in interfaceReadOnlyBuildSettings
- Returns:
- list of artifact dependencies.
-
getBuildRunners
@NotNull public Collection<? extends SBuildStepDescriptor> getBuildRunners()
Description copied from interface:ReadOnlyBuildSettings
Returns enabled build runners.- Specified by:
getBuildRunners
in interfaceBuildSettings
- Specified by:
getBuildRunners
in interfaceReadOnlyBuildSettings
- Returns:
- build runners in the defined order.
-
getAllBuildRunners
@NotNull public SBuildStepsCollection getAllBuildRunners()
- Specified by:
getAllBuildRunners
in interfaceBuildSettings
- Returns:
- preprocessed with extensions collection of build runners
-
getBuildFeatures
@NotNull public Collection<SBuildFeatureDescriptor> getBuildFeatures()
Description copied from interface:ReadOnlyBuildSettings
Returns enabled build features.- Specified by:
getBuildFeatures
in interfaceReadOnlyBuildSettings
- Returns:
- collection of enabled build features.
-
getParametersAvailableOnAgents
@NotNull public Map<String,String> getParametersAvailableOnAgents()
Description copied from interface:ReadOnlyBuildSettings
The method returns map of parameters which will be available on the agents for the current build. Note: for some parameters value can be unknown at the moment of the call, so for them empty values will be returned- Specified by:
getParametersAvailableOnAgents
in interfaceReadOnlyBuildSettings
- See Also:
BuildParametersProvider.getParametersAvailableOnAgent(SBuild)
-
getBuildFeaturesOfType
@NotNull public Collection<SBuildFeatureDescriptor> getBuildFeaturesOfType(@NotNull String featureType)
Description copied from interface:ReadOnlyBuildSettings
Returns unresolved enabled build features of specified type- Specified by:
getBuildFeaturesOfType
in interfaceReadOnlyBuildSettings
- Parameters:
featureType
- feature type of interest- Returns:
- see above
-
getOptions
@NotNull public ReadOnlyOptionSupport getOptions()
Description copied from interface:BuildSettings
Build options.- Specified by:
getOptions
in interfaceBuildSettings
- Returns:
- see above
-
getOption
@NotNull public <T> T getOption(@NotNull Option<T> option)
- Specified by:
getOption
in interfaceReadOnlyBuildSettings
-
getParametersCollection
@NotNull public Collection<Parameter> getParametersCollection()
Description copied from interface:ReadOnlyUserParameters
Returns build and configuration parameters in single collection.- Specified by:
getParametersCollection
in interfaceReadOnlyUserParameters
- Returns:
- see above
-
getParameterValue
@Nullable public String getParameterValue(@NotNull String paramName)
- Specified by:
getParameterValue
in interfaceReadOnlyUserParameters
- Parameters:
paramName
- parameter name- Returns:
- value of the parameter with given name or null if there is no such parameter
-
getParameters
@NotNull public Map<String,String> getParameters()
Description copied from interface:ReadOnlyUserParameters
Returns map of build and configuration parameters.- Specified by:
getParameters
in interfaceReadOnlyUserParameters
- Returns:
- build and configuration parameters map
-
getParameter
@Nullable public Parameter getParameter(@NotNull String paramName)
- Specified by:
getParameter
in interfaceReadOnlyUserParameters
-
getRequirements
@NotNull public List<Requirement> getRequirements()
Description copied from interface:ReadOnlyBuildSettings
Get list of explicit requirements for build agents which can run this build configuration. Explicit requirements are specified by user in Web UI explicitly.- Specified by:
getRequirements
in interfaceReadOnlyBuildSettings
- Returns:
- see above
-
getRunnersRequirements
@NotNull public List<Requirement> getRunnersRequirements()
- Specified by:
getRunnersRequirements
in interfaceReadOnlyBuildSettings
- Returns:
- returns list of requirements imposed by runners.
-
getBuildFeaturesRequirements
@NotNull public List<Requirement> getBuildFeaturesRequirements()
- Specified by:
getBuildFeaturesRequirements
in interfaceReadOnlyBuildSettings
- Returns:
- returns list of requirements imposed by build features.
-
getArtifactPaths
@Nullable public String getArtifactPaths()
Description copied from interface:ReadOnlyBuildSettings
Provides with build artifact paths. Artifact paths are comma separated paths to build artifacts. Support ant-style wildcards and target directories like *.zip => winFiles,unix/distro.tgz => linuxFiles, where winFiles and linuxFiles are target directories.- Specified by:
getArtifactPaths
in interfaceReadOnlyBuildSettings
- Returns:
- build artifact paths
-
getLabelPattern
@NotNull public String getLabelPattern()
- Specified by:
getLabelPattern
in interfaceReadOnlyBuildSettings
- Returns:
- Returns pattern to use for labeling
-
getUndefinedParameters
@NotNull public Map<String,SettingDescription> getUndefinedParameters()
Description copied from interface:BuildSettings
Computes all undefined parameters based on current settings. Parameter is undefined if there is a reference to it in any of build settings and available parameters collection does not contain it.- Specified by:
getUndefinedParameters
in interfaceBuildSettings
- Returns:
- see above
-
computeUndefinedParameters
@NotNull public static Map<String,SettingDescription> computeUndefinedParameters(@NotNull Map<String,SettingDescription> referencedParamsMap, @NotNull Supplier<ParametersProvider> parametersProviderSupplier)
-
getReferencedParameters
@NotNull public Map<String,SettingDescription> getReferencedParameters()
- Specified by:
getReferencedParameters
in interfaceBuildSettings
- Returns:
- all referenced parameters with description of the place where reference to parameter is specified.
-
getBuildNumberPattern
@NotNull public String getBuildNumberPattern()
- Specified by:
getBuildNumberPattern
in interfaceReadOnlyBuildSettings
- Returns:
- build number pattern
-
getDigest
@NotNull public byte[] getDigest()
Description copied from interface:ReadOnlyBuildSettings
Returns digest of settings, i.e. some hash describing the settings state. If hashes are different then settings are considered different too.- Specified by:
getDigest
in interfaceReadOnlyBuildSettings
- Returns:
- see above
-
computeArtifactDependencyDigest
protected void computeArtifactDependencyDigest(@NotNull ArtifactDependency dep, @NotNull MessageDigest md)
-
sortArtifactDependencies
@NotNull public static List<SArtifactDependency> sortArtifactDependencies(@NotNull List<SArtifactDependency> unsorted)
-
getParentSettings
@NotNull public abstract ReadOnlyBuildTypeSettings getParentSettings()
- Specified by:
getParentSettings
in interfaceBuildSettings
- Returns:
- original build type settings used as base object for this build settings instance.
-
isCompositeBuild
public boolean isCompositeBuild()
- Specified by:
isCompositeBuild
in interfaceReadOnlyBuildSettings
- Returns:
- true if these settings represent a composite build
-
-