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 StringALLOW_ANY_CHARS_KEYstatic Set<String>ALWAYS_AVAILABLE_PARAMETERSprotected Filter<SArtifactDependency>ENABLED_ARTIFACT_DEPENDENCIES_FILTERprotected Filter<Requirement>ENABLED_REQUIREMENTS_FILTERprotected Filter<ParametersDescriptor>ENABLED_SETTINGS_FILTERstatic StringTEAMCITY_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:ReadOnlyBuildSettingsReturns VCS root entries associated with this build, i.e. build configuration VCS root entries on the moment of build starting.- Specified by:
getVcsRootEntriesin interfaceReadOnlyBuildSettings- Returns:
- see above
-
getCheckoutType
@NotNull public BuildTypeDescriptor.CheckoutType getCheckoutType()
Description copied from interface:ReadOnlyBuildSettingsReturns 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:
getCheckoutTypein interfaceReadOnlyBuildSettings- Returns:
- method to get sources on agent.
-
getCheckoutDirectory
@Nullable public String getCheckoutDirectory()
Description copied from interface:ReadOnlyBuildSettingsReturns build checkout directory - if specified explicitly. Returns null if default checkout directory, generated by TeamCity should be used.- Specified by:
getCheckoutDirectoryin interfaceReadOnlyBuildSettings- Returns:
- build checkout directory
-
getArtifactDependencies
@NotNull public List<SArtifactDependency> getArtifactDependencies()
- Specified by:
getArtifactDependenciesin interfaceReadOnlyBuildSettings- Returns:
- list of artifact dependencies.
-
getBuildRunners
@NotNull public Collection<? extends SBuildStepDescriptor> getBuildRunners()
Description copied from interface:ReadOnlyBuildSettingsReturns enabled build runners.- Specified by:
getBuildRunnersin interfaceBuildSettings- Specified by:
getBuildRunnersin interfaceReadOnlyBuildSettings- Returns:
- build runners in the defined order.
-
getAllBuildRunners
@NotNull public SBuildStepsCollection getAllBuildRunners()
- Specified by:
getAllBuildRunnersin interfaceBuildSettings- Returns:
- preprocessed with extensions collection of build runners
-
getBuildFeatures
@NotNull public Collection<SBuildFeatureDescriptor> getBuildFeatures()
Description copied from interface:ReadOnlyBuildSettingsReturns enabled build features.- Specified by:
getBuildFeaturesin interfaceReadOnlyBuildSettings- Returns:
- collection of enabled build features.
-
getParametersAvailableOnAgents
@NotNull public Map<String,String> getParametersAvailableOnAgents()
Description copied from interface:ReadOnlyBuildSettingsThe 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:
getParametersAvailableOnAgentsin interfaceReadOnlyBuildSettings- See Also:
BuildParametersProvider.getParametersAvailableOnAgent(SBuild)
-
getBuildFeaturesOfType
@NotNull public Collection<SBuildFeatureDescriptor> getBuildFeaturesOfType(@NotNull String featureType)
Description copied from interface:ReadOnlyBuildSettingsReturns unresolved enabled build features of specified type- Specified by:
getBuildFeaturesOfTypein interfaceReadOnlyBuildSettings- Parameters:
featureType- feature type of interest- Returns:
- see above
-
getOptions
@NotNull public ReadOnlyOptionSupport getOptions()
Description copied from interface:BuildSettingsBuild options.- Specified by:
getOptionsin interfaceBuildSettings- Returns:
- see above
-
getOption
@NotNull public <T> T getOption(@NotNull Option<T> option)- Specified by:
getOptionin interfaceReadOnlyBuildSettings
-
getParametersCollection
@NotNull public Collection<Parameter> getParametersCollection()
Description copied from interface:ReadOnlyUserParametersReturns build and configuration parameters in single collection.- Specified by:
getParametersCollectionin interfaceReadOnlyUserParameters- Returns:
- see above
-
getParameterValue
@Nullable public String getParameterValue(@NotNull String paramName)
- Specified by:
getParameterValuein 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:ReadOnlyUserParametersReturns map of build and configuration parameters.- Specified by:
getParametersin interfaceReadOnlyUserParameters- Returns:
- build and configuration parameters map
-
getParameter
@Nullable public Parameter getParameter(@NotNull String paramName)
- Specified by:
getParameterin interfaceReadOnlyUserParameters
-
getRequirements
@NotNull public List<Requirement> getRequirements()
Description copied from interface:ReadOnlyBuildSettingsGet 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:
getRequirementsin interfaceReadOnlyBuildSettings- Returns:
- see above
-
getRunnersRequirements
@NotNull public List<Requirement> getRunnersRequirements()
- Specified by:
getRunnersRequirementsin interfaceReadOnlyBuildSettings- Returns:
- returns list of requirements imposed by runners.
-
getBuildFeaturesRequirements
@NotNull public List<Requirement> getBuildFeaturesRequirements()
- Specified by:
getBuildFeaturesRequirementsin interfaceReadOnlyBuildSettings- Returns:
- returns list of requirements imposed by build features.
-
getArtifactPaths
@Nullable public String getArtifactPaths()
Description copied from interface:ReadOnlyBuildSettingsProvides 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:
getArtifactPathsin interfaceReadOnlyBuildSettings- Returns:
- build artifact paths
-
getLabelPattern
@NotNull public String getLabelPattern()
- Specified by:
getLabelPatternin interfaceReadOnlyBuildSettings- Returns:
- Returns pattern to use for labeling
-
getUndefinedParameters
@NotNull public Map<String,SettingDescription> getUndefinedParameters()
Description copied from interface:BuildSettingsComputes 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:
getUndefinedParametersin 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:
getReferencedParametersin interfaceBuildSettings- Returns:
- all referenced parameters with description of the place where reference to parameter is specified.
-
getBuildNumberPattern
@NotNull public String getBuildNumberPattern()
- Specified by:
getBuildNumberPatternin interfaceReadOnlyBuildSettings- Returns:
- build number pattern
-
getDigest
@NotNull public byte[] getDigest()
Description copied from interface:ReadOnlyBuildSettingsReturns digest of settings, i.e. some hash describing the settings state. If hashes are different then settings are considered different too.- Specified by:
getDigestin 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:
getParentSettingsin interfaceBuildSettings- Returns:
- original build type settings used as base object for this build settings instance.
-
isCompositeBuild
public boolean isCompositeBuild()
- Specified by:
isCompositeBuildin interfaceReadOnlyBuildSettings- Returns:
- true if these settings represent a composite build
-
-