Class BuildTypeImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.BaseBuildTypeIdentity
-
- jetbrains.buildServer.serverSide.impl.BuildTypeImpl
-
- All Implemented Interfaces:
Comparable<BuildTypeDescriptor>
,EventListener
,BuildType
,BuildTypeDescriptor
,BuildConfigurationInfo
,BuildTypeEx
,BuildTypeIdentity
,BuildTypeIdentityEx
,BuildTypeOptions
,BuildTypeSettings
,BuildTypeSettingsListener
,CleanupSettings
,CleanupSettingsInit
,CompatibleAgents
,DependencySettings
,Dependent
,InheritableUserParametersHolder
,InheritableUserParametersHolderEx
,InternalParameters
,LVcsRootInstanceHolder
,LVcsRootInstanceHolderEx
,ParametersSupport
,ReadOnlyUserParameters
,SBuildType
,SPersistentEntity
,UserParametersHolder
,VcsLabelingSettings
,VcsWorkspaceAccess
,OptionSupport
- Direct Known Subclasses:
SecuredBuildType
public class BuildTypeImpl extends BaseBuildTypeIdentity implements BuildTypeEx, BuildTypeSettingsListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.BuildTypeDescriptor
BuildTypeDescriptor.CheckoutType
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.BuildTypeOptions
BuildTypeOptions.BuildConfigurationType
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.vcs.VcsLabelingSettings
VcsLabelingSettings.LabelingType
-
-
Field Summary
Fields Modifier and Type Field Description protected BuildTypeContext
myContext
static String
REVERSE_DEP_PARAMETER_PREFIX
static String
SHOW_WORSE_BRANCH_STATUS
-
Fields inherited from class jetbrains.buildServer.serverSide.impl.BaseBuildTypeIdentity
IGNORE_BUILD_CONF_DEPENDENCIES_ON_MOVE, myEntityId, myExtIdChangeLock, myFormerExternalId, myName, myProject
-
Fields inherited from interface jetbrains.buildServer.BuildTypeDescriptor
FULL_NAME_SEPARATOR
-
Fields inherited from interface jetbrains.buildServer.serverSide.BuildTypeOptions
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_GENERATED_SETTINGS_CHECKSUM, BT_HANGING_BUILDS_DETECTION_ENABLED, BT_MAX_RUNNING_BUILDS, BT_MAX_RUNNING_BUILDS_PER_BRANCH, BT_SHOW_DEPS_CHANGES, BT_SUPPORT_TEST_RETRY, DEFAULT_BUILD_NUMBER_PATTERN, DEFAULT_MAX_RUNNING_BUILDS_PER_BRANCH, DEFAULT_VCS_LABELING_BRANCH_FILTER, VCS_LABELING_BRANCH_FILTER
-
Fields inherited from interface jetbrains.buildServer.serverSide.CleanupSettings
CLEANUP_PREVENT_DEPENDENCIES_ARTIFACTS_FROM_CLEANUP, DISABLE_CLEANUP_POLICIES
-
Fields inherited from interface jetbrains.buildServer.serverSide.vcs.VcsLabelingSettings
DEFAULT_LABEL_PATTERN
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BuildTypeImpl(BuildTypeContext context, EntityId<String> id, String name, BuildTypeSettingsEx settings, ProjectEx project, boolean emptyUuid)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addArtifactDependency(SArtifactDependency dependency)
Adds artifact dependency.SBuildFeatureDescriptor
addBuildFeature(String type, Map<String,String> params)
Adds build feature with specified type and parameters to this settings object.void
addBuildFeature(SBuildFeatureDescriptor feature)
Adds build feature descriptor to this settings object.void
addBuildParameter(Parameter parameter)
Adds build parameter to the configuration.SBuildRunnerDescriptor
addBuildRunner(String id, String name, String runnerType, Map<String,String> parameters)
Creates a new build runner with the specified id, name, runner type, and parameters, and adds it to the current build settings.SBuildRunnerDescriptor
addBuildRunner(String name, String runnerType, Map<String,String> parameters)
Creates new build runner and adds it to these settings.SBuildRunnerDescriptor
addBuildRunner(BuildRunnerDescriptor runner)
Adds runner descriptor.BuildTriggerDescriptor
addBuildTrigger(String type, Map<String,String> params)
Adds new trigger of specified type and with specified parameters to build configuration settings.boolean
addBuildTrigger(BuildTriggerDescriptor triggerDescriptor)
Adds new trigger to build configuration settings.void
addCleanupPolicy(HistoryRetentionPolicy policy)
Sets cleanup policy for this build configurationvoid
addConfigParameter(Parameter param)
Adds configuration parameter.void
addDependency(Dependency dependOn)
Add dependency on another build configurationvoid
addParameter(Parameter param)
Adds parameter.void
addRequirement(Requirement requirement)
Adds new build requirement to the configuration.void
addRunParameter(Parameter parameter)
For tests only!void
addTemplate(BuildTypeTemplate template, boolean optimizeSettings)
Attach one more build configuration to a template.SQueuedBuild
addToQueue(String triggeredBy)
Adds build instance of the configuration to the queue with the specified requestor name.SQueuedBuild
addToQueue(BuildAgent agent, String triggeredBy)
Adds build instance of the configuration to the queue with the specified requestor name on the specified agent (if agent is authorized).SQueuedBuild
addToQueue(BuildPromotionEx buildPromotion, String triggeredBy)
Adds build to queue with specified build promotion.SQueuedBuild
addToQueue(SAgentRestrictor agentRestrictor, BuildPromotionEx buildPromotion, String triggeredBy)
Adds build to queue on the specified agent with manually set build parameters: these build parameters will redefined build parameters specified within this build configurationboolean
addVcsRoot(SVcsRoot root)
Adds VCS root to the build configuration with default checkout rules.void
afterAddBuildTrigger(BuildTriggerDescriptor btd)
void
afterAddDependency(Dependency dep)
void
afterAddRequirement(Requirement req)
void
afterAddVcsRoot(SVcsRoot vcsRoot)
void
afterRemoveBuildTrigger(BuildTriggerDescriptor btd)
void
afterRemoveDependency(Dependency dep)
void
afterRemoveRequirement(Requirement req)
void
afterRemoveVcsRoot(SVcsRoot root)
void
afterUpdateBuildTrigger(BuildTriggerDescriptor newTrigger, BuildTriggerDescriptor oldTrigger)
void
applyRunnersOrder(String[] ids)
Accepts array of runner identifiers and reorders them according to this array.void
artifactDependenciesChanged()
void
attachedToModel(ProjectDataModel projectDataModel)
void
attachToTemplate(BuildTypeTemplate template)
Attaches this build configuration to the specified template.void
attachToTemplate(BuildTypeTemplate template, boolean changeScopeOfLocalRoots)
Attaches this build configuration to the specified templateprotected void
auditExternalIdChanged(ConfigAction cause, String oldExternalId, String newExternalId)
void
beforeAddDependency(Dependency dep)
void
beforeAddRequirement(Requirement req)
void
beforeAddVcsRoot(SVcsRoot vcsRoot)
protected void
beforeParameterModification(String paramName)
void
beforeRemoveDependency(Dependency dep)
void
beforeRemoveRequirement(Requirement req)
void
beforeRemoveVcsRoot(SVcsRoot vcsRoot)
void
branchesChanged(boolean currentNodeEvent, Date branchChangeTimestamp)
Notifies build configuration that the branches may have changed.static void
branchesChanged(Collection<BuildTypeEx> buildTypes, boolean currentNodeEvent, Date branchChangeTimestamp, CustomDataStorageManager customDataStorageManager)
void
buildPatch(RunningBuildEx runningBuild, FullCheckoutFlag fullCheckoutFlag, LowLevelPatchBuilder builder, BuildServerEx buildServer, VcsStatusLogger vcsStatusLogger, AgentCheckoutDirRevisionInfo dirInfo)
boolean
canListFiles()
protected void
checkObsolete()
void
checkoutRulesChanged(SVcsRoot vcsRoot, CheckoutRules oldRules, CheckoutRules newRules)
void
clearPrevPromotionCache(Collection<BuildPromotion> targetPromos)
static int
compareBuildTypes(BuildTypeDescriptor buildType1, BuildTypeDescriptor buildType2)
int
compareTo(BuildTypeDescriptor descriptor)
boolean
containsOwnVcsRoot(long vcsRootId)
Returns true if VCS root with specified id is attached directly and is not inherited via a templateboolean
containsVcsRoot(long vcsRootId)
Returns true if VCS root with specified id is attached directly or is inherited via a templateBuildCustomizer
createBuildCustomizer(SUser user)
CreatesBuildCustomizer
that can be used to create custom promotions for this build typeBuildPromotionEx
createBuildPromotion()
Creates new build promotion which then can be used when build is added to a queue.BuildPromotionEx
createBuildPromotion(String branchName)
Creates build promotion graph and sets specified branch name to all its nodes.BuildPromotionEx
createBuildPromotion(String branchName, BuildPromotionInitializer initializer)
Same asBuildTypeEx.createBuildPromotion(String)
but accepts initializer which is called for every new build promotion in the created build chainBuildPromotionEx
createBuildPromotion(String branchName, BuildPromotionInitializer initializer, DependenciesSupplier dependenciesSupplier)
Same asBuildTypeEx.createBuildPromotion(String)
but accepts initializer and dependencies supplier.BuildTypeEx
createEditableCopy(boolean fillSettings)
protected ConfigAction
createExternalIdChangedConfigAction()
static Compatibility
createIncompatibleResult()
RemoteBuildTypeEx
createPersonalBuildType(User user, long changeListId)
Creates personal build type, i.e.RemoteBuildTypeEx
createPersonalBuildType(User user, String comment)
Creates personal build type, i.e.RemoteBuildTypeEx
createPersonalBuildType(User user, String comment, Map<VcsRootInstance,VcsRootInstance> overridenRoots)
Create personal build type that starts build with overriden roots.void
dependencyReplaced(Dependency old, Dependency newDep)
void
detachFromTemplate()
Detaches build configuration from all templates, except for the default one if present.void
dispose()
Must be called when this build configuration object is removed from the model.boolean
equals(Object obj)
SBuildFeatureDescriptor
findBuildFeatureById(String featureId)
Returns build feature with specified idSBuildRunnerDescriptor
findBuildRunnerById(String runnerId)
Finds build runner by its' idSBuildRunnerDescriptor
findBuildRunnerByType(String runnerType)
Returns first build runner of specified type or nullString
findRunnerParameter(String paramName)
Searches runner parameter in all build runners and returns value of the first found parameter with given name.Collection<BuildTypeEx>
findTops()
BuildTriggerDescriptor
findTriggerById(String triggerId)
Finds build trigger descriptor by its' idvoid
forceCheckingForChanges()
Starts checking for changes for all VCS roots of this build configurationvoid
forceCheckingForChanges(OperationRequestor requestor)
Starts checking for changes for all VCS roots of this build configurationList<BranchEx>
getActiveBranches()
Set<String>
getAdditionalBranchesForChangesCollecting(LVcsRootInstance root, VcsRepositoryState state)
List<BranchSpec>
getAdditionalBranchSpecs(LVcsRootInstance root, VcsRepositoryState state)
List<BranchSpec>
getAdditionalBranchSpecs(VcsRootInstance root, VcsRepositoryState state)
List<AgentCompatibility>
getAgentCompatibilities()
Returns information about what agent are compatible with the configuration, what are incompatible and why.CompatibilityResult
getAgentCompatibility(AgentDescription agentDescription)
Warning - this function is slow because it's not cached.AgentCompatibility
getAgentCompatibility(SBuildAgent agent)
Returns information about agent compatibility for the specified agent.List<SBuildAgent>
getAgentsWhereBuildConfigurationBuilt()
Returns list of agents (sorted by name) where this build configuration was ever built.AgentCompatibility
getAgentTypeCompatibility(SAgentType agentType)
List<SArtifactDependency>
getArtifactDependencies()
Returns artifacts this build configuration depending on.List<File>
getArtifactDirectories()
static String
getArtifactDirName(String name)
String
getArtifactPaths()
Returns build artifact paths.File
getArtifactsDirectory()
Returns directory containing artifacts of this build configuration.List<SBuildType>
getArtifactsReferences()
Returns list of build configurations which depend on this build configurations artifactsBranchEx
getBranch(String name)
BranchEx
getBranchByDisplayName(String branchDisplayName)
Returns a branch by its display name.List<BranchEx>
getBranches(BranchCalculationOptions branchCalculationOptions)
List<BranchEx>
getBranches(BranchesPolicy policy, Boolean includeBranchesFromDependencies)
List<BranchEx>
getBranches(BranchesPolicy policy, Boolean includeBranchesFromDependencies, boolean computeTimestamps)
BranchSpec
getBranchSpec(LVcsRootInstance root)
BranchSpec
getBranchSpec(SVcsRoot parentRoot)
Returns branch specification for specified parent rootBranchSpec
getBranchSpec(VcsRootInstance root)
Build
getBuildByBuildNumber(String buildNumber)
Returns most recent build instance with specified build number.long
getBuildDuration(BuildAgent agent)
Returns estimated duration of a build on the specified agent.List<Requirement>
getBuildFeatureRequirements()
Returns list of additional agent requirements imposed by configured enabled build features.Collection<SBuildFeatureDescriptor>
getBuildFeatures()
Returns build features added to this settings object.Collection<SBuildFeatureDescriptor>
getBuildFeaturesOfType(String type)
Returns all build features of specified type.String
getBuildNumberPattern()
Returns current build number patternBuildNumbers
getBuildNumbers()
Returns interface to manipulate current build counterString
getBuildParameter(String key)
Returns build parameter by parameter keyMap<String,String>
getBuildParameters()
Returns the map of build parameters specified by user.Collection<Parameter>
getBuildParametersCollection()
Returns build parameters collection.List<SBuildRunnerDescriptor>
getBuildRunners()
Returns collection of build runners attached to these settingsBuildSettings
getBuildSettings()
Returns build settings: settings for build (where excluded disabled options and features).Collection<BuildTriggerDescriptor>
getBuildTriggerDescriptors(String triggerName, boolean enabledOnly)
Collection<BuildTriggerDescriptor>
getBuildTriggersCollection()
Returns collection of build trigger settingsBuildTypeBranches
getBuildTypeBranches()
BranchFilter
getBuildTypeBranchFilter()
BranchFilter
getBuildTypeBranchFilterUnsafe()
Same asSBuildType.getBuildTypeBranchFilter()
but throws an exception if the branch filter is incorrectString
getBuildTypeId()
Returns build configuration internal id.BuildTypeOrderedBuildsImpl
getBuildTypeOrderedBuilds()
List<BuildAgentEx>
getCanRunAgents()
Returns list of agents where this build configuration can run.List<BuildAgentEx>
getCanRunAndCompatibleAgents(boolean includeDisabled)
Collects registered compatible agents where this build configuration is allowed to run.List<StartableAgentType>
getCanRunAndCompatibleAgentTypes()
Returns list of cloud agent types which are both allowed to run this configuration and are compatible with it.Option[]
getChangedOptions()
Return options with changed values, i.e.String
getCheckoutDirectory()
Returns build checkout directory - if specified explicitly usingBuildTypeSettings.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.Collection<SBuildType>
getChildDependencies()
Returns all child dependencies collected down the chain.Map<String,Boolean>
getCleanupOptions()
Collection<HistoryRetentionPolicy>
getCleanupPolicies()
Map<SBuildAgent,CompatibilityResult>
getCompatibilityMap()
Returns compatibility map, key is an agent and value is compatibility result.Collection<SBuildAgent>
getCompatibleAgents()
Returns collection of compatible agentsprotected FileHistory
getConfigHistory()
Map<String,String>
getConfigParameters()
Returns map of configuration parametersCollection<Parameter>
getConfigParametersCollection()
Returns collection of configuration parameters.CustomDataStorage
getCustomDataStorage(String storageId)
Returns custom data storage associated with this build configuration.<T> T
getDeclaredOption(Option<T> option)
Get option value declared in this BuildTypeSettingsString
getDefaultBranchDisplayName()
Returns a display name of the default branch according to the current settings of all VCS roots attached to build configuration (their default branch vcs names and branch specs).Map<SBuildType,DependencyOptions>
getDependedOnMe()
List<Dependency>
getDependencies()
Get existing dependencies, empty collection when no dependencies existBuildTypeDependencyGraph
getDependencyGraph()
List<SBuildType>
getDependencyReferences()
Returns list of build configurations directly referencing this build configuration.String
getDescription()
Returns configuration description.List<ChangeDescriptor>
getDetectedChanges(SelectPrevBuildPolicy prevBuildPolicy)
List<ChangeDescriptor>
getDetectedChanges(SelectPrevBuildPolicy prevBuildPolicy, Boolean includeDependencyChanges)
DummyBuild
getDummyBuild()
DummyBuildPromotion
getDummyBuildPromotion()
DummyBuildPromotion
getDummyBuildPromotion(boolean createIfNotExists)
Set<Long>
getExcludedDefaultRootInstanceIds()
Returns set of vcs root instance ids with excluded default branchint
getExecutionTimeoutMin()
Returns duration the build allowed to run until killed by the server.String
getExtendedFullName()
Returns the full name of build configuration with additional note if the project is archived.String
getExtendedName()
Returns the name of build configuration with additional note if the project is archived.byte[]
getFileContent(String relativePath)
Get binary content of the latest version of a file related to this build type.byte[]
getFileContent(String relativePath, boolean latest)
Same as {@link #getFileContent(String, false)}static String
getFullName(String projectName, String btName)
List<SFinishedBuild>
getHistory()
List<SFinishedBuild>
getHistory(User user, boolean includeCanceled, boolean orderByChanges)
Returns all finished builds, visible for the specified user of this configuration.List<SFinishedBuild>
getHistoryFull(boolean orderByChanges)
String
getId()
Returns build configuration internal idList<Requirement>
getImplicitRequirements()
Get list of non-satisfied implicit requirements for build agents.Map<String,Boolean>
getInheritedCleanupOptions()
Collection<HistoryRetentionPolicy>
getInheritedCleanupPolicies()
Collection<Parameter>
getInheritedParametersCollection()
List<VcsRoot>
getLabelingRoots()
List of roots which should be processed by labeling processVcsLabelingSettings.LabelingType
getLabelingType()
String
getLabelPattern()
SFinishedBuild
getLastChangesFinished()
Returns last finished instance for the build configuration with last user changes (personal builds and canceled builds are excluded).SBuild
getLastChangesStartedBuild()
Returns instance of the build, finished or running, which contains latest changes in this build configurationSFinishedBuild
getLastChangesSuccessfullyFinished()
Returns last successfully finished build in the configuration with last user changes, personal builds are not consideredAuditLogAction
getLastConfigModificationAction()
Comment
getLastPauseComment()
Differs fromSBuildType.getPauseComment()
- it returns last comment for pause action only.BranchSpec
getLastUsedBranchSpec(SVcsRoot parentRoot)
Returns branch specification used for changes collecting in given VCS root.Map<VcsRootInstance,BranchSpec>
getLastUsedBranchSpecMap()
Map<VcsRootInstance,BranchSpec>
getLastUsedBranchSpecMap(boolean includeSettingsRoot)
List<SBuild>
getLatestBuilds()
Set<String>
getLogicalBranchNames(VcsRootInstance root, String vcsBranch)
Returns set of possible logical names for the given VCS branch in the given VCS root according to current VCS root settings (i.e.int
getMaximumNumberOfBuilds()
Returns maximum number of simultaneously running builds.String
getMaximumNumberOfBuildsPerBranch()
List<SVcsModification>
getModificationsSinceLastSuccessful()
Returns all modifications made since last successfully finished buildint
getNumberOfArtifactReferences()
Returns number of dependent build configuration having references to this build configuration.int
getNumberOfDependencyReferences()
Returns number of dependency references (the number includes all references even those which are not available because of permissions)int
getNumberQueued()
Returns number of items for this build configurations currently waiting in queue<T> T
getOption(Option<T> option)
Get option value<T> T
getOptionDefaultValue(Option<T> option)
Collection<Option>
getOptions()
Map<String,Boolean>
getOwnCleanupOptions()
Collection<HistoryRetentionPolicy>
getOwnCleanupPolicies()
List<Dependency>
getOwnDependencies()
Returns list of own dependencies (not inherited from a template).Parameter
getOwnNonInheritedParameter(String paramName)
Own parameter without inherited parameter spec.Collection<Option>
getOwnOptions()
Return options defined in this object, i.e.Parameter
getOwnParameter(String paramName)
Map<String,String>
getOwnParameters()
Collection<Parameter>
getOwnParametersCollection()
Collection<Parameter>
getOwnParametersWithoutInheritedSpec()
List<String>
getOwnTemplateIds()
List<BuildTypeTemplateEx>
getOwnTemplates()
Returns a list of templates to which the build configuration is directly attached.Collection<String>
getOwnVcsBranchNames(boolean activeOnly)
List<VcsRootEntry>
getOwnVcsRootEntries()
Parameter
getParameter(String paramName)
Map<String,String>
getParameters()
Returns map of build and configuration parameters.Collection<Parameter>
getParametersCollection()
Returns build and configuration parameters in single collection.ParametersProvider
getParametersProvider()
Returns parameters which can be used by value resolver.String
getParameterValue(String paramName)
Comment
getPauseComment()
Returns comment for pausing/resuming this build typeList<SVcsModification>
getPendingChanges()
Returns changes in this build configuration already detected but not associated with a build.Collection<SUser>
getPendingChangesCommitters()
Returns pending changes committers to this build configurationList<ChangeDescriptor>
getPendingChangesInAllBranches(Boolean includeDepChanges)
Returns pending changes detected in all branches of this build configuration.List<ChangeDescriptor>
getPendingChangesInAllBranches(Boolean includeDependencyChanges, VcsModificationProcessor callback)
ProjectEx
getProject()
Returns the project this build type entity belongs to.String
getProjectExternalId()
Returns external id of the project this build configuration configured in.String
getProjectName()
Returns project name this configuration belongs to.List<SQueuedBuild>
getQueuedBuilds()
List<SQueuedBuild>
getQueuedBuilds(User user)
If user is null or has "Show personal builds of other users" enabled, returns all queued builds including all personal builds.Map<String,DependencyOptions>
getRawDependedOnMe()
Map from internal build type id to dependency optionsReadOnlyReason
getReadOnlyReason()
Set<Long>
getRelatedVcsRootInstanceIds()
Returns ids of VCS root instances which reported changes associated with this build configuration.List<Requirement>
getRequirements()
Get list of explicit requirements for build agents which can run this build configuration.Collection<BuildTriggerDescriptor>
getResolvedBuildTriggerDescriptors(boolean enabledOnly)
Collection<BuildTriggerDescriptor>
getResolvedBuildTriggerDescriptors(String triggerName, boolean enabledOnly)
ResolvedSettings
getResolvedSettings()
Returns resolved settings of this build configuration (with parameter references substituted)ResponsibilityEntry
getResponsibilityInfo()
Returns the information about responsibility on this build configuration.String
getRunBuildActionName()
BuildStepConditions
getRunnerConditions(SBuildRunnerDescriptor descriptor)
String[]
getRunnersOrder()
Collection<String>
getRunnerTypes()
Returns collection of types of enabled build runners configured in this configurationList<SRunningBuild>
getRunningBuilds()
Same as getRunningBuilds(null)List<SRunningBuild>
getRunningBuilds(User user)
List<Requirement>
getRunTypeRequirements()
Returns list of additional agent requirements imposed by configured runners.BuildTypeSettingsEx
getSettings()
SBuildType
getSourceBuildType()
If current instance is an instance of RemoteBuildType - returns base configuration for remote build type, otherwise - returns this.Status
getStatus()
Returns current status of the configuration.BuildTypeStatusDescriptor
getStatusDescriptor()
Returns current status of the configuration with text description and status build.List<String>
getTags()
List of all tags set for builds of this configuration.List<String>
getTags(SUser user)
List of all private tags set for builds of this configuration by the specified user.BuildTypeTemplateEx
getTemplate()
Deprecated.String
getTemplateId()
Deprecated.List<String>
getTemplateIds()
Returns internal ids of the templates this settings are based on, including one of the default templateList<BuildTypeTemplateEx>
getTemplates()
Returns templates these settings are based on, including the default template.List<SBuildType>
getTransitiveDependedOnMe()
Returns all build configurations collected up the dependency chain.List<String>
getUndefinedParameters()
Returns collection of parameter names (config and build params) referenced in the build configuration settings but without values provided.ValueResolver
getValueResolver()
Returns value resolver which can be used to resolve references in valuesBrowser
getVcsFilesBrowser()
Browser
getVcsFoldersBrowser()
List<VcsRootEntry>
getVcsRootEntries()
Returns all entries of vcs roots.List<VcsRootInstanceEntry>
getVcsRootInstanceEntries()
List<VcsRootInstanceEntry>
getVcsRootInstanceEntries(boolean includeSettingsRoot)
Returns entries for VCS roots attached to this buildType.List<VcsRootInstanceEntry>
getVcsRootInstanceEntries(Set<String> vcsNames, boolean includeSettingsRoot)
Returns entries corresponding to specified vcs support namesVcsRootInstanceEntry
getVcsRootInstanceEntryForParent(SVcsRoot parentRoot)
VcsRootInstance
getVcsRootInstanceForParent(SVcsRoot parentRoot)
List<VcsRootInstance>
getVcsRootInstances()
List<SVcsRoot>
getVcsRoots()
Returns all roots currently attached to this configurationString
getVcsRootsHash()
Deprecated.String
getVcsRootsHash(BuildTypeDescriptor.CheckoutType checkoutType)
Returns build configuration vcs roots hash without taking checkout directory into account
The resulting hash is an equal to the default checkout directory.String
getVcsSettingsHash()
Deprecated.String
getVcsSettingsHash(List<VcsRootInstanceEntry> vcsRootEntries)
Deprecated.boolean
hasBuilds()
int
hashCode()
boolean
hasOwnBranches()
void
init(boolean paused, String description)
BuildTypeEx
inline()
Creates a temporary copy of this buildType with all settings inherited from a project or a template inlined.boolean
intersectsWith(Dependent dependent)
Returns true if this object dependencies intersect (have same nodes) with specified object dependencies.boolean
isAgentLessBuildType()
boolean
isAllowExternalStatus()
Returns if viewing of the configuration status is allowed externally.boolean
isBranchSpecDefined(boolean processDependencies)
boolean
isBranchSpecDefined(boolean processDependencies, boolean processSettingsRoot)
static boolean
isBranchSpecDefined(Collection<? extends VcsRoot> vcsRoots, ValueResolver valueResolver)
boolean
isCheckoutOnAgent()
boolean
isCheckoutOnServer()
boolean
isCleanBuild()
Returns if all files on an agent machine should be deleted before the build is started.boolean
isCompositeBuildType()
boolean
isDefaultBranchExcluded()
Returns true default branch is excluded in the build configuration branch filterboolean
isDeployment()
boolean
isEmptyUuid()
boolean
isEnabled(String id)
Returns true if descriptor with specified id (runner, trigger or build feature) is enabled and false otherwise.boolean
isImplicitSettingsRoot(VcsRootInstance root)
Returns true if the specified VCS root is an implicit settings root, ie.boolean
isInQueue()
Returns true if the configuration is queued at the momentstatic boolean
isInsideVcsRootsResolving()
boolean
isPaused()
Returns if the configuration is paused.boolean
isPersonal()
Returns if the configuration is temporary created for the personal build.boolean
isReadOnly()
boolean
isShouldFailBuildIfTestsFailed()
Returnstrue
if build of the configuration has to fail if there is failed test.protected boolean
isTemplate()
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.boolean
isValidVcsBranch(String name, boolean includeBranchesFromDependencies)
boolean
isVirtual()
List<VcsFile>
listFiles(String relativePath)
Lists files in the directory specified by relativePathprotected void
logChangedConfigToAudit(ConfigAction cause, String description, int versionAfter)
protected void
logRemovingToAudit(ConfigAction cause)
PathMapping
mapVcsPath(String path)
Returns path mapping for the given full VCS path of a file if this path can correspond to any of the project's VCS roots.void
moveToProject(ConfigAction cause, SProject targetProject)
Moves this build configuration to thetarget
project.void
moveToProject(SProject target)
Moves this build configuration to thetarget
project.void
moveToProject(SProject target, boolean changeScopeOfLocalRoots)
Moves this build configuration to thetarget
project.protected void
nameChanged(String oldName, String newName)
RunningBuildEx
newAgentLessBuild(QueuedBuildEx queuedBuild, SBuildAgent buildAgent, Date removeFromQueueTime)
Creates new SRunningBuild instance and sets executor name as a build promotion attribute for the purposes of Executor mode builds.void
newBuildRunnersOrderApplied(String[] ids)
RunningBuildEx
newRunningBuild(QueuedBuildEx queuedBuild, SBuildAgent buildAgent, Date removeFromQueueTime)
Creates new SRunningBuild instance.void
persistAuxiliaryData()
protected void
persistInternal(ConfigAction cause)
protected void
persistInternal(BackgroundPersistTask task)
void
processHistoryEntries(ItemProcessor<SFinishedBuild> itemProcessor)
Invokes the given ItemProcessor for all history records of this build type.void
reassignIntId(String internalId)
Assigns the specified internalId to this buildType.void
releaseSources()
Releases sources of the build configuration on ALL agents where this configuration built.void
releaseSources(SBuildAgent agent)
Releases sources of the build configuration on specified agent only.boolean
rememberLastUsedRootInstanceAndBranchSpec(LVcsRootInstance root, BranchSpec spec)
Stores branch specification used for changes collecting in given VCS root and resets a pending changes cache if root or spec is changed since last call to this method or whenforcePendingChangesReset
is truevoid
removeAllBuildRunners()
Removes all build runnersvoid
removeArtifactDependency(SArtifactDependency dependency)
Removes artifact dependency.SBuildFeatureDescriptor
removeBuildFeature(String featureId)
Removes build feature with specified id from this settings object.void
removeBuildParameter(String paramName)
Removes existing build parameter by its name.SBuildRunnerDescriptor
removeBuildRunner(String runnerId)
Removes runner descriptor with specified id.boolean
removeBuildTrigger(BuildTriggerDescriptor triggerDescriptor)
Removes specified build trigger from the settingsvoid
removeCleanupPolicies()
Remove all own cleanup policies for the objectvoid
removeConfigParameter(String paramName)
Removes configuration parameters with specified nameboolean
removeDependency(Dependency dependOn)
Remove dependency on another build configurationvoid
removeParameter(String paramName)
Removes parameter.void
removeRequirement(String propertyName)
Removes first requirement with the specified property name from the configuration.void
removeRequirement(Requirement requirement)
Removes a requirement from the configuration.void
removeResponsible(boolean buildWasFixed, User responsibleUser, String comment, User whoPerformsTheAction)
Removes responsible information , mark it is either 'fixed' or 'not fixed'.void
removeTemplates(Collection<? extends BuildTypeTemplate> templates, boolean inlineSettings)
Detaches build configuration from a number of templates.boolean
removeVcsRoot(SVcsRoot root)
Removes existing VCS root from the build configuration.boolean
replaceInValues(String regexp, String replacement)
Replaces values according to specified regexp and replacement string in all text parameters of the build configurationboolean
replaceInValues(Pattern regexpPattern, String replacement)
Replaces values according to specified pattern and replacement string in all text parameters of the build configurationboolean
replaceVcsRoot(SVcsRoot oldVcsRoot, SVcsRoot newVcsRoot)
Replaces existing VCS root entry in settings with a new one, maintaining the order of the root entriesvoid
resetDummyBuilds()
void
resetPendingChanges()
void
resetRunnersOrder()
Resets custom runner order to default.void
resetTagsCache()
void
sendExtIdChangedEvents(ConfigAction cause, String oldExternalId, String newExternalId)
The method is called when the external identifier has been changed.protected void
sendPersistedEvents(ConfigAction cause)
void
setArtifactDependencies(List<SArtifactDependency> artifacts)
Sets artifacts this build configuration depending on.void
setArtifactPaths(String artifactPaths)
Sets build artifact paths.void
setBuildNumberPattern(String pattern)
Sets build number pattern.void
setCheckoutDirectory(String dir)
Sets build checkout directory.boolean
setCheckoutRules(VcsRoot root, CheckoutRules rules)
Sets checkout rules for specified VCS root.void
setCheckoutType(BuildTypeDescriptor.CheckoutType type)
Sets preferred checkout type for the configuration sources.void
setCleanupOption(String option, Boolean value)
Sets value for a cleanup optionvoid
setDescription(String description)
Changes configuration description.void
setDirtyCompatibility()
void
setEditable(boolean editable)
Enables or disables editing of the build type in web UI, see alsoSPersistentEntity.isReadOnly()
.void
setEnabled(String id, boolean enabled)
Enables or disables descriptor with specified id in build configuration settings.<T> void
setOption(Option<T> option, T value)
Set option value, clears value if it is the same as defaultvoid
setPaused(boolean paused, User user)
Pause/unpause this build configuration.void
setPaused(boolean paused, User user, String comment)
Pause/unpause this build configuration.void
setResponsible(User responsibleUser, String userComment, User reporterUser)
Called when a user takes a responsibility for the build type.void
setSettings(BuildTypeSettingsEx newSettings)
Complete replacement of settingsvoid
setTemplates(List<? extends BuildTypeTemplate> templates, boolean optimizeSettings)
Replaces templates the build configuration is attached to.void
setTemplatesOrder(List<String> templateIds)
Imposes new order on the templates the build configuration is attached to.void
settingEnabledOrDisabled(String id, boolean enabled)
boolean
setVcsRoots(Collection<SVcsRoot> vcsRoots)
Sets VCS roots.void
textValueChanged()
Called when a text value in a parameter has changed.boolean
textValueMatches(Pattern regexpPattern)
Returns true if configuration has value in text parameters which matches specified pattern.String
toString()
void
traverseDependedOnMe(DependencyConsumer<BuildTypeEx> consumer)
void
traverseDependencies(DependencyConsumer<BuildTypeEx> consumer)
void
traverseSelfAndDependedOnMe(DependencyConsumer<BuildTypeEx> consumer)
void
traverseSelfAndDependencies(DependencyConsumer<BuildTypeEx> consumer)
void
unregister()
Removes this object from project model.boolean
updateBuildFeature(String featureId, String newType, Map<String,String> newParams)
Updates build feature descriptor with specified id, changes type and parameters.boolean
updateBuildRunner(String runnerId, String name, String type, Map<String,String> params)
Updates parameters in the existing build runner descriptor.boolean
updateBuildTrigger(String triggerId, String newType, Map<String,String> newParams)
Updates build trigger descriptor with specified id, changes type and parameters.boolean
updateBuildTrigger(BuildTriggerDescriptor newDescriptor)
Updates build trigger descriptor with id equal to newDescriptor id.void
updateRevisionsForOwnBranches(Collection<String> logicalBranchNames)
Make sure that revisions for specified logical branches are calculated and saved in dummy build promotions.protected void
warnObsolete()
-
Methods inherited from class jetbrains.buildServer.serverSide.impl.BaseBuildTypeIdentity
beforeModification, belongsTo, createConfigAction, createFirstConfigVersionIfHistoryIsEmpty, doPersist, doPersist, getConfigDirectory, getConfigId, getConfigurationFile, getConfigurationFile, getEntityId, getExternalId, getFullName, getInternalId, getName, getParent, getProjectId, getVersion, markEdited, markPersisted, markUnedited, persist, persist, processConfigIfChanged, remove, remove, schedulePersisting, schedulePersisting, schedulePersisting, scheduleRemove, setExternalId, setExternalId, setExternalId, setName
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.BuildTypeDescriptor
getExternalId, getFullName, getName, getProjectId
-
Methods inherited from interface jetbrains.buildServer.serverSide.BuildTypeEx
getTypedOption
-
Methods inherited from interface jetbrains.buildServer.serverSide.BuildTypeIdentity
getConfigurationFile, getExternalId, getFullName, getInternalId, getName, setExternalId, setExternalId
-
Methods inherited from interface jetbrains.buildServer.serverSide.BuildTypeIdentityEx
getEntityId, setExternalId
-
Methods inherited from interface jetbrains.buildServer.serverSide.BuildTypeSettings
persist
-
Methods inherited from interface jetbrains.buildServer.serverSide.InheritableUserParametersHolderEx
getOwnAndParentsNonInheritedParameter, getOwnAndParentsNonInheritedParameters
-
Methods inherited from interface jetbrains.buildServer.serverSide.InternalParameters
getBooleanInternalParameter, getBooleanInternalParameterOrTrue, getInternalParameterValue
-
Methods inherited from interface jetbrains.buildServer.serverSide.LVcsRootInstanceHolder
getName
-
Methods inherited from interface jetbrains.buildServer.serverSide.SBuildType
belongsTo, persist, setName
-
Methods inherited from interface jetbrains.buildServer.serverSide.SPersistentEntity
createConfigAction, getConfigId, getConfigurationFile, getParent, getVersion, markPersisted, persist, remove, schedulePersisting, schedulePersisting, scheduleRemove
-
-
-
-
Field Detail
-
SHOW_WORSE_BRANCH_STATUS
public static final String SHOW_WORSE_BRANCH_STATUS
- See Also:
- Constant Field Values
-
myContext
@NotNull protected final BuildTypeContext myContext
-
REVERSE_DEP_PARAMETER_PREFIX
public static final String REVERSE_DEP_PARAMETER_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BuildTypeImpl
protected BuildTypeImpl(@NotNull BuildTypeContext context, @NotNull EntityId<String> id, @NotNull String name, @NotNull BuildTypeSettingsEx settings, @NotNull ProjectEx project, boolean emptyUuid)
-
-
Method Detail
-
isShouldFailBuildIfTestsFailed
public boolean isShouldFailBuildIfTestsFailed()
Description copied from interface:SBuildType
Returnstrue
if build of the configuration has to fail if there is failed test.- Specified by:
isShouldFailBuildIfTestsFailed
in interfaceSBuildType
- Returns:
- true, if build has to became failed after at least one test failed, regardless of build script exit code.
- See Also:
BuildTypeOptions.BT_FAIL_IF_TESTS_FAIL
-
isAllowExternalStatus
public boolean isAllowExternalStatus()
Description copied from interface:SBuildType
Returns if viewing of the configuration status is allowed externally.- Specified by:
isAllowExternalStatus
in interfaceSBuildType
- Returns:
- if viewing of the configuration status is allowed externally.
- See Also:
BuildTypeOptions.BT_ALLOW_EXTERNAL_STATUS
-
getExecutionTimeoutMin
public int getExecutionTimeoutMin()
Description copied from interface:SBuildType
Returns duration the build allowed to run until killed by the server.- Specified by:
getExecutionTimeoutMin
in interfaceSBuildType
- Returns:
- build execution timeout in minutes, timeout 0 means 'forever'
- See Also:
BuildTypeOptions.BT_EXECUTION_TIMEOUT
-
getBuildTypeId
@NotNull public String getBuildTypeId()
Description copied from interface:BuildTypeDescriptor
Returns build configuration internal id. Cannot be changed.- Specified by:
getBuildTypeId
in interfaceBuildTypeDescriptor
- Specified by:
getBuildTypeId
in interfaceLVcsRootInstanceHolder
- Returns:
- unique id
-
getProjectExternalId
@NotNull public String getProjectExternalId()
Description copied from interface:BuildTypeDescriptor
Returns external id of the project this build configuration configured in.- Specified by:
getProjectExternalId
in interfaceBuildTypeDescriptor
- Returns:
- parent project external id.
-
getProjectName
@NotNull public String getProjectName()
Description copied from interface:BuildTypeDescriptor
Returns project name this configuration belongs to.- Specified by:
getProjectName
in interfaceBuildTypeDescriptor
- Returns:
- parent project name.
-
setDescription
public void setDescription(String description)
Description copied from interface:SBuildType
Changes configuration description.- Specified by:
setDescription
in interfaceSBuildType
- Parameters:
description
- new configuration description.
-
setCheckoutType
public void setCheckoutType(BuildTypeDescriptor.CheckoutType type)
Description copied from interface:BuildTypeSettings
Sets preferred checkout type for the configuration sources. Actual checkout type may differ, for example, if preferred checkout type is set to ON_AGENT, but there is vcs root which does not support on agent checkout, actual checkout type will be switched to ON_SERVER.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.- Specified by:
setCheckoutType
in interfaceBuildTypeSettings
- Parameters:
type
- new checkout type.
-
setCheckoutDirectory
public void setCheckoutDirectory(String dir)
Description copied from interface:BuildTypeSettings
Sets build checkout directory. Set it to null to use default checkout directory.- Specified by:
setCheckoutDirectory
in interfaceBuildTypeSettings
- Parameters:
dir
- checkout directory
-
removeRequirement
public void removeRequirement(String propertyName)
Description copied from interface:BuildTypeSettings
Removes first requirement with the specified property name from the configuration.- Specified by:
removeRequirement
in interfaceBuildTypeSettings
- Parameters:
propertyName
- name of the requirement parameter.
-
removeRequirement
public void removeRequirement(Requirement requirement)
Description copied from interface:BuildTypeSettings
Removes a requirement from the configuration.- Specified by:
removeRequirement
in interfaceBuildTypeSettings
- Parameters:
requirement
- requirement to be removed
-
getBuildNumberPattern
@NotNull public String getBuildNumberPattern()
Description copied from interface:BuildTypeSettings
Returns current build number pattern- Specified by:
getBuildNumberPattern
in interfaceBuildTypeSettings
- Returns:
- see above
-
setBuildNumberPattern
public void setBuildNumberPattern(@NotNull String pattern)
Description copied from interface:BuildTypeSettings
Sets build number pattern. %build.counter% in the pattern will be replaced with current build number value when build starts- Specified by:
setBuildNumberPattern
in interfaceBuildTypeSettings
- Parameters:
pattern
- pattern to set
-
getDescription
public String getDescription()
Description copied from interface:BuildTypeDescriptor
Returns configuration description.- Specified by:
getDescription
in interfaceBuildTypeDescriptor
- Returns:
- configuration description.
-
getRunnerTypes
@NotNull public Collection<String> getRunnerTypes()
Description copied from interface:BuildTypeDescriptor
Returns collection of types of enabled build runners configured in this configuration- Specified by:
getRunnerTypes
in interfaceBuildTypeDescriptor
- Specified by:
getRunnerTypes
in interfaceBuildTypeSettings
- Returns:
- see above
-
getId
@NotNull public String getId()
Description copied from interface:BuildConfigurationInfo
Returns build configuration internal id- Specified by:
getId
in interfaceBuildConfigurationInfo
- Returns:
- see above
-
getMaximumNumberOfBuilds
public int getMaximumNumberOfBuilds()
Description copied from interface:SBuildType
Returns maximum number of simultaneously running builds. 0 means there is no limit on a number of builds.- Specified by:
getMaximumNumberOfBuilds
in interfaceBuildConfigurationInfo
- Specified by:
getMaximumNumberOfBuilds
in interfaceSBuildType
- Returns:
- see above
- See Also:
BuildTypeOptions.BT_MAX_RUNNING_BUILDS
-
getMaximumNumberOfBuildsPerBranch
@NotNull public String getMaximumNumberOfBuildsPerBranch()
- Specified by:
getMaximumNumberOfBuildsPerBranch
in interfaceBuildTypeEx
- Returns:
- see
BuildTypeOptions.BT_MAX_RUNNING_BUILDS_PER_BRANCH
which may include parameters references or null if no limits specified
-
getRequirements
@NotNull public List<Requirement> getRequirements()
Description copied from interface:BuildTypeSettings
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 interfaceBuildTypeSettings
- Returns:
- see above
-
getImplicitRequirements
@NotNull public List<Requirement> getImplicitRequirements()
Description copied from interface:BuildTypeSettings
Get list of non-satisfied implicit requirements for build agents. Implicit requirements appear when some build configuration property, or run parameter contains a reference to another parameter in form %<param name>%.- Specified by:
getImplicitRequirements
in interfaceBuildTypeSettings
- Returns:
- see above
-
getRunTypeRequirements
@NotNull public List<Requirement> getRunTypeRequirements()
Description copied from interface:BuildTypeSettings
Returns list of additional agent requirements imposed by configured runners.- Specified by:
getRunTypeRequirements
in interfaceBuildTypeSettings
- Returns:
- see above
-
getBuildFeatureRequirements
@NotNull public List<Requirement> getBuildFeatureRequirements()
Description copied from interface:BuildTypeSettings
Returns list of additional agent requirements imposed by configured enabled build features.- Specified by:
getBuildFeatureRequirements
in interfaceBuildTypeSettings
- Returns:
- see above
-
addBuildRunner
@NotNull public SBuildRunnerDescriptor addBuildRunner(@NotNull BuildRunnerDescriptor runner)
Description copied from interface:BuildTypeSettings
Adds runner descriptor. UseBuildRunnerDescriptorFactory
to create instance of runner descriptor.
Before 8.0 this method requiredSBuildRunnerDescriptor
as parameter- Specified by:
addBuildRunner
in interfaceBuildTypeSettings
- Parameters:
runner
- descriptor- Returns:
- instance of actually added runner
-
addBuildRunner
@NotNull public SBuildRunnerDescriptor addBuildRunner(@NotNull String name, @NotNull String runnerType, @NotNull Map<String,String> parameters)
Description copied from interface:BuildTypeSettings
Creates new build runner and adds it to these settings. Runner's ID is autogenerated- Specified by:
addBuildRunner
in interfaceBuildTypeSettings
- Parameters:
name
- runner namerunnerType
- type of the runnerparameters
- runner parameters- Returns:
- newly created runner
-
addBuildRunner
@NotNull public SBuildRunnerDescriptor addBuildRunner(@NotNull String id, @NotNull String name, @NotNull String runnerType, @NotNull Map<String,String> parameters) throws DuplicateIdException, InvalidIdentifierException, ReadOnlyEntityException
Description copied from interface:BuildTypeSettings
Creates a new build runner with the specified id, name, runner type, and parameters, and adds it to the current build settings.- Specified by:
addBuildRunner
in interfaceBuildTypeSettings
- Parameters:
id
- the unique id of the build runner (should be unique within all runners of this configuration)name
- the name of the build runnerrunnerType
- the type of the build runnerparameters
- the parameters for the build runner- Returns:
- the newly created build runner descriptor
- Throws:
DuplicateIdException
- if the id is already in use by another build runner, runners inherited from templates are not consideredInvalidIdentifierException
- if the id is invalid or emptyReadOnlyEntityException
- if the settings are read-only and cannot be modified
-
removeBuildRunner
public SBuildRunnerDescriptor removeBuildRunner(@NotNull String runnerId)
Description copied from interface:BuildTypeSettings
Removes runner descriptor with specified id.- Specified by:
removeBuildRunner
in interfaceBuildTypeSettings
- Parameters:
runnerId
- descriptor id- Returns:
- removed runner descriptor
-
updateBuildRunner
public boolean updateBuildRunner(@NotNull String runnerId, @NotNull String name, @NotNull String type, @NotNull Map<String,String> params)
Description copied from interface:BuildTypeSettings
Updates parameters in the existing build runner descriptor. Does nothing if there runner with specified id was not found.- Specified by:
updateBuildRunner
in interfaceBuildTypeSettings
- Parameters:
runnerId
- id of runner descriptorname
- new runner nametype
- new type of the runnerparams
- new runner parameters- Returns:
- true if parameters updated and false otherwise
-
getRunnerConditions
@NotNull public BuildStepConditions getRunnerConditions(@NotNull SBuildRunnerDescriptor descriptor)
- Specified by:
getRunnerConditions
in interfaceBuildTypeSettings
- Returns:
- support for conditions for conditional build steps
-
getBuildRunners
@NotNull public List<SBuildRunnerDescriptor> getBuildRunners()
Description copied from interface:BuildTypeSettings
Returns collection of build runners attached to these settings- Specified by:
getBuildRunners
in interfaceBuildTypeSettings
- Returns:
- see above
-
findBuildRunnerByType
@Nullable public SBuildRunnerDescriptor findBuildRunnerByType(@NotNull String runnerType)
Description copied from interface:SBuildType
Returns first build runner of specified type or null- Specified by:
findBuildRunnerByType
in interfaceBuildType
- Specified by:
findBuildRunnerByType
in interfaceBuildTypeSettings
- Specified by:
findBuildRunnerByType
in interfaceSBuildType
- Parameters:
runnerType
- type of the runner- Returns:
- see above
-
findBuildRunnerById
public SBuildRunnerDescriptor findBuildRunnerById(@NotNull String runnerId)
Description copied from interface:BuildTypeSettings
Finds build runner by its' id- Specified by:
findBuildRunnerById
in interfaceBuildTypeSettings
- Parameters:
runnerId
- id of the runner- Returns:
- build runner or null if runner with such id not found
-
findRunnerParameter
public String findRunnerParameter(@NotNull String paramName)
Description copied from interface:BuildTypeSettings
Searches runner parameter in all build runners and returns value of the first found parameter with given name.- Specified by:
findRunnerParameter
in interfaceBuildTypeSettings
- Parameters:
paramName
- name of the parameter- Returns:
- the first found parameter value or null
-
addRequirement
public void addRequirement(@NotNull Requirement requirement)
Description copied from interface:BuildTypeSettings
Adds new build requirement to the configuration. If the requirement has no id, then a copy of it with new id is generated and added to the settings.- Specified by:
addRequirement
in interfaceBuildTypeSettings
- Parameters:
requirement
- new requirement.
-
addRunParameter
public void addRunParameter(@NotNull Parameter parameter)
Description copied from interface:BuildTypeEx
For tests only!- Specified by:
addRunParameter
in interfaceBuildTypeEx
-
addBuildParameter
public void addBuildParameter(Parameter parameter)
Description copied from interface:BuildTypeSettings
Adds build parameter to the configuration. Build parameter is a system or environment variable. Concrete parameter type is being selected by its name prefix.Constants.SYSTEM_PREFIX
for system properties andConstants.ENV_PREFIX
for environment variable.- Specified by:
addBuildParameter
in interfaceBuildTypeSettings
- Parameters:
parameter
- specified parameter.
-
getCompatibilityMap
@NotNull public Map<SBuildAgent,CompatibilityResult> getCompatibilityMap()
Description copied from interface:CompatibleAgents
Returns compatibility map, key is an agent and value is compatibility result.- Specified by:
getCompatibilityMap
in interfaceCompatibleAgents
- Returns:
- see above
-
getCompatibleAgents
@NotNull public Collection<SBuildAgent> getCompatibleAgents()
Description copied from interface:CompatibleAgents
Returns collection of compatible agents- Specified by:
getCompatibleAgents
in interfaceCompatibleAgents
- Returns:
- see above
-
getAgentCompatibility
public AgentCompatibility getAgentCompatibility(@NotNull SBuildAgent agent)
Description copied from interface:SBuildType
Returns information about agent compatibility for the specified agent.- Specified by:
getAgentCompatibility
in interfaceSBuildType
- Parameters:
agent
- the given agent.- Returns:
- agent compatibility for the specified agent.
-
getAgentTypeCompatibility
@NotNull public AgentCompatibility getAgentTypeCompatibility(@NotNull SAgentType agentType)
- Specified by:
getAgentTypeCompatibility
in interfaceBuildTypeEx
-
getCanRunAndCompatibleAgentTypes
@NotNull public List<StartableAgentType> getCanRunAndCompatibleAgentTypes()
Description copied from interface:BuildTypeEx
Returns list of cloud agent types which are both allowed to run this configuration and are compatible with it.- Specified by:
getCanRunAndCompatibleAgentTypes
in interfaceBuildTypeEx
- Returns:
- list of cloud agent types which are both allowed to run this configuration and are compatible with it.
-
getAgentCompatibility
@NotNull public CompatibilityResult getAgentCompatibility(@NotNull AgentDescription agentDescription)
Warning - this function is slow because it's not cached. UsegetAgentTypeCompatibility(jetbrains.buildServer.serverSide.agentTypes.SAgentType)
orgetAgentCompatibility(jetbrains.buildServer.serverSide.SBuildAgent)
instead.- Specified by:
getAgentCompatibility
in interfaceCompatibleAgents
- Parameters:
agentDescription
- agent description- Returns:
- compatibility results.
- See Also:
CompatibilityResult
-
createIncompatibleResult
@NotNull public static Compatibility createIncompatibleResult()
-
getDependencyGraph
@NotNull public BuildTypeDependencyGraph getDependencyGraph()
- Specified by:
getDependencyGraph
in interfaceBuildTypeEx
- Returns:
- graph of snapshot dependencies assuming this build configuration is a top one.
-
findTops
@NotNull public Collection<BuildTypeEx> findTops()
- Specified by:
findTops
in interfaceBuildTypeEx
- Returns:
- all topmost build configurations having direct or transitive snapshot dependency on this build configuration. If there are no such build configurations returns itself.
-
removeBuildParameter
public void removeBuildParameter(String paramName)
Description copied from interface:BuildTypeSettings
Removes existing build parameter by its name.- Specified by:
removeBuildParameter
in interfaceBuildTypeSettings
- Parameters:
paramName
- specified parameter name.
-
getRunningBuilds
@NotNull public List<SRunningBuild> getRunningBuilds(@Nullable User user)
Description copied from interface:SBuildType
- Specified by:
getRunningBuilds
in interfaceBuildType
- Specified by:
getRunningBuilds
in interfaceSBuildType
- Parameters:
user
- owner of personal builds- Returns:
- list of running builds
-
getRunningBuilds
@NotNull public List<SRunningBuild> getRunningBuilds()
Description copied from interface:SBuildType
Same as getRunningBuilds(null)- Specified by:
getRunningBuilds
in interfaceBuildType
- Specified by:
getRunningBuilds
in interfaceSBuildType
- Returns:
- list of running builds
-
setPaused
public void setPaused(boolean paused, User user)
Description copied from interface:SBuildType
Pause/unpause this build configuration. Paused build configuration is not triggered by VCS check-ins and time triggers.- Specified by:
setPaused
in interfaceSBuildType
- Parameters:
paused
- if configuration should be pauseduser
- use who is pausing the configuration
-
setPaused
public void setPaused(boolean paused, User user, String comment)
Description copied from interface:SBuildType
Pause/unpause this build configuration. Paused build configuration is not triggered by VCS check-ins and time triggers.- Specified by:
setPaused
in interfaceSBuildType
- Parameters:
paused
- if configuration should be pauseduser
- use who is pausing the configurationcomment
- user comment
-
init
public void init(boolean paused, String description)
-
getLogicalBranchNames
@Nullable public Set<String> getLogicalBranchNames(@NotNull VcsRootInstance root, @NotNull String vcsBranch)
Description copied from interface:BuildTypeEx
Returns set of possible logical names for the given VCS branch in the given VCS root according to current VCS root settings (i.e. default branch, branch spec)- Specified by:
getLogicalBranchNames
in interfaceBuildTypeEx
- Parameters:
root
- root of interestvcsBranch
- vcs branch of interest- Returns:
- see above or null if branch spec is not specified for this vcs root instance
-
getDefaultBranchDisplayName
@NotNull public String getDefaultBranchDisplayName()
Description copied from interface:BuildTypeEx
Returns a display name of the default branch according to the current settings of all VCS roots attached to build configuration (their default branch vcs names and branch specs). Returned value might be different from Branch.DEFAULT_BRANCH_NAME when logical name of the default branch in all the roots is the same.- Specified by:
getDefaultBranchDisplayName
in interfaceBuildTypeEx
- Returns:
- see above
-
getBranchByDisplayName
@NotNull public BranchEx getBranchByDisplayName(@NotNull String branchDisplayName)
Description copied from interface:BuildTypeEx
Returns a branch by its display name.Usually branch display equals to branch name. The only exception is default branch (see comments to
BuildTypeEx.getDefaultBranchDisplayName()
. This method allows you to get a default branch by its custom display name. UseBuildTypeEx.getBranch(String)
method if you are sure you use a branch name (not a display name) or branch is not a default one, because this method is slower thanBuildTypeEx.getBranch(String)
.- Specified by:
getBranchByDisplayName
in interfaceBuildTypeEx
- Parameters:
branchDisplayName
- branch display name- Returns:
- see above
-
hasBuilds
public boolean hasBuilds()
- Specified by:
hasBuilds
in interfaceBuildTypeEx
- Returns:
- true if this build configuration has builds
-
getPauseComment
@Nullable public Comment getPauseComment()
Description copied from interface:SBuildType
Returns comment for pausing/resuming this build type- Specified by:
getPauseComment
in interfaceSBuildType
- Returns:
- comment for pausing/resuming this build type
-
getLastPauseComment
@Nullable public Comment getLastPauseComment()
Description copied from interface:BuildTypeEx
Differs fromSBuildType.getPauseComment()
- it returns last comment for pause action only.- Specified by:
getLastPauseComment
in interfaceBuildTypeEx
- Returns:
-
isPaused
public boolean isPaused()
Description copied from interface:BuildTypeDescriptor
Returns if the configuration is paused.- Specified by:
isPaused
in interfaceBuildTypeDescriptor
- Returns:
- true is build is paused. In this state build can be added to queue manually only, all other triggers are disabled.
-
getModificationsSinceLastSuccessful
public List<SVcsModification> getModificationsSinceLastSuccessful()
Description copied from interface:SBuildType
Returns all modifications made since last successfully finished build- Specified by:
getModificationsSinceLastSuccessful
in interfaceBuildType
- Specified by:
getModificationsSinceLastSuccessful
in interfaceSBuildType
- Returns:
- list of version control modifications, detected since last successful finished build has been finished
-
addToQueue
@Nullable public SQueuedBuild addToQueue(@NotNull String triggeredBy)
Description copied from interface:SBuildType
Adds build instance of the configuration to the queue with the specified requestor name.- Specified by:
addToQueue
in interfaceSBuildType
- Parameters:
triggeredBy
- contains details about who triggered build, see alsoTriggeredByBuilder
- Returns:
- new queued build instance if there is no instances of this configuration in the queue, or previously added instance otherwise.
-
addToQueue
@Nullable public SQueuedBuild addToQueue(@NotNull BuildPromotionEx buildPromotion, @NotNull String triggeredBy)
Description copied from interface:BuildTypeEx
Adds build to queue with specified build promotion. Build promotion contains various settings necessary to run a build, like build parameters, build revisions and so on.- Specified by:
addToQueue
in interfaceBuildTypeEx
- Parameters:
buildPromotion
- build promotiontriggeredBy
- who added build to queue- Returns:
- new queued build instance if there is no instances of this configuration in the queue, or previously added instance otherwise.
-
addToQueue
@Nullable public SQueuedBuild addToQueue(@NotNull BuildAgent agent, @NotNull String triggeredBy)
Description copied from interface:SBuildType
Adds build instance of the configuration to the queue with the specified requestor name on the specified agent (if agent is authorized).- Specified by:
addToQueue
in interfaceSBuildType
- Parameters:
agent
- specified agent.triggeredBy
- contains details about who triggered build, see alsoTriggeredByBuilder
- Returns:
null
if agent is not authorized, new SQueuedBuild instance if queue does not contain this configuration with specified agent and existing one otherwise
-
addToQueue
@Nullable public SQueuedBuild addToQueue(@NotNull SAgentRestrictor agentRestrictor, @NotNull BuildPromotionEx buildPromotion, @NotNull String triggeredBy)
Description copied from interface:BuildTypeEx
Adds build to queue on the specified agent with manually set build parameters: these build parameters will redefined build parameters specified within this build configuration- Specified by:
addToQueue
in interfaceBuildTypeEx
buildPromotion
- build promotiontriggeredBy
- who added build to queue- Returns:
- new queued build instance if there is no instances of this configuration in the queue, or previously added instance otherwise.
-
getSettings
@NotNull public BuildTypeSettingsEx getSettings()
- Specified by:
getSettings
in interfaceBuildTypeEx
- Specified by:
getSettings
in interfaceBuildTypeIdentityEx
- Returns:
- Underlying build settings object
-
dispose
public void dispose()
Description copied from interface:BuildTypeEx
Must be called when this build configuration object is removed from the model.- Specified by:
dispose
in interfaceBuildTypeEx
-
getQueuedBuilds
@NotNull public List<SQueuedBuild> getQueuedBuilds(@Nullable User user)
Description copied from interface:SBuildType
If user is null or has "Show personal builds of other users" enabled, returns all queued builds including all personal builds. Otherwise, returns non-personal queued builds and personal builds of the specified user.- Specified by:
getQueuedBuilds
in interfaceSBuildType
- Parameters:
user
- user- Returns:
- see above
-
getQueuedBuilds
@NotNull public List<SQueuedBuild> getQueuedBuilds()
- Specified by:
getQueuedBuilds
in interfaceBuildTypeEx
-
getPendingChanges
public List<SVcsModification> getPendingChanges()
Description copied from interface:SBuildType
Returns changes in this build configuration already detected but not associated with a build. Only own changes are returned ignoring changes from dependencies option.- Specified by:
getPendingChanges
in interfaceBuildType
- Specified by:
getPendingChanges
in interfaceSBuildType
- Returns:
- list of version control modifications, which are detected but no build with these modifications is created yet.
-
getPendingChangesCommitters
public Collection<SUser> getPendingChangesCommitters()
Description copied from interface:SBuildType
Returns pending changes committers to this build configuration- Specified by:
getPendingChangesCommitters
in interfaceSBuildType
- Returns:
- see above
-
getBuildParameters
@NotNull public Map<String,String> getBuildParameters()
Description copied from interface:BuildType
Returns the map of build parameters specified by user. For more details please seeBuildTypeSettings.getBuildParameters()
(server side).- Specified by:
getBuildParameters
in interfaceBuildType
- Specified by:
getBuildParameters
in interfaceBuildTypeSettings
- Returns:
- build parameters map
- See Also:
BuildType.getBuildParameter(String)
-
getParameters
@NotNull public Map<String,String> getParameters()
Description copied from interface:BuildType
Returns map of build and configuration parameters.- Specified by:
getParameters
in interfaceBuildType
- Specified by:
getParameters
in interfaceInheritableUserParametersHolder
- Specified by:
getParameters
in interfaceReadOnlyUserParameters
- Returns:
- build and configuration parameters map
-
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
-
getOwnParametersCollection
@NotNull public Collection<Parameter> getOwnParametersCollection()
- Specified by:
getOwnParametersCollection
in interfaceInheritableUserParametersHolder
- Returns:
- own parameters, without inherited. Yet they would have inherited specs or values (if any).
-
getOwnParameters
@NotNull public Map<String,String> getOwnParameters()
- Specified by:
getOwnParameters
in interfaceInheritableUserParametersHolder
- Returns:
- own parameters map, without inherited. Yet they would have inherited specs or values (if any).
-
getBuildParametersCollection
@NotNull public Collection<Parameter> getBuildParametersCollection()
Description copied from interface:BuildTypeSettings
Returns build parameters collection.- Specified by:
getBuildParametersCollection
in interfaceBuildTypeSettings
- Returns:
- see above
-
isInQueue
public boolean isInQueue()
Description copied from interface:BuildType
Returns true if the configuration is queued at the moment
-
getNumberQueued
public int getNumberQueued()
Description copied from interface:BuildType
Returns number of items for this build configurations currently waiting in queue- Specified by:
getNumberQueued
in interfaceBuildType
- Returns:
- number of queued builds of this configuration.
-
getStatus
public Status getStatus()
Description copied from interface:BuildType
Returns current status of the configuration.
-
getStatusDescriptor
@NotNull public BuildTypeStatusDescriptor getStatusDescriptor()
Description copied from interface:BuildType
Returns current status of the configuration with text description and status build.- Specified by:
getStatusDescriptor
in interfaceBuildType
- Returns:
- configuration status, which is calculated according to statuses of all the running builds (except personal) plus latest finished one.
-
getLatestBuilds
@NotNull public List<SBuild> getLatestBuilds()
- Specified by:
getLatestBuilds
in interfaceBuildTypeEx
- Returns:
- latest builds (currently running and last finished)
-
toString
public String toString()
- Overrides:
toString
in classBaseBuildTypeIdentity
-
addBuildTrigger
public boolean addBuildTrigger(@NotNull BuildTriggerDescriptor triggerDescriptor)
Description copied from interface:BuildTypeSettings
Adds new trigger to build configuration settings. UseBuildTriggerDescriptorFactory
to create trigger descriptor.- Specified by:
addBuildTrigger
in interfaceBuildTypeSettings
- Parameters:
triggerDescriptor
- trigger descriptor- Returns:
- true if trigger was added, and false if trigger with such id already exists
-
addBuildTrigger
@NotNull public BuildTriggerDescriptor addBuildTrigger(@NotNull String type, @NotNull Map<String,String> params)
Description copied from interface:BuildTypeSettings
Adds new trigger of specified type and with specified parameters to build configuration settings.- Specified by:
addBuildTrigger
in interfaceBuildTypeSettings
- Parameters:
type
- type of the triggerparams
- parameters map- Returns:
- newly created trigger descriptor
-
removeBuildTrigger
public boolean removeBuildTrigger(@NotNull BuildTriggerDescriptor triggerDescriptor)
Description copied from interface:BuildTypeSettings
Removes specified build trigger from the settings- Specified by:
removeBuildTrigger
in interfaceBuildTypeSettings
- Parameters:
triggerDescriptor
- trigger descriptor- Returns:
- true if trigger was actually removed and false otherwise
-
updateBuildTrigger
public boolean updateBuildTrigger(@NotNull String triggerId, @NotNull String newType, @NotNull Map<String,String> newParams)
Description copied from interface:BuildTypeSettings
Updates build trigger descriptor with specified id, changes type and parameters.- Specified by:
updateBuildTrigger
in interfaceBuildTypeSettings
- Parameters:
triggerId
- id of build trigger descriptornewType
- type of build trigger descriptornewParams
- parameters map- Returns:
- true if parameters of build trigger descriptor were changed (descriptor with such id exists) and false otherwise
-
updateBuildTrigger
public boolean updateBuildTrigger(@NotNull BuildTriggerDescriptor newDescriptor)
Description copied from interface:BuildTypeSettings
Updates build trigger descriptor with id equal to newDescriptor id.- Specified by:
updateBuildTrigger
in interfaceBuildTypeSettings
- Parameters:
newDescriptor
- new settings of the trigger- Returns:
- true if parameters of build trigger descriptor were changed (descriptor with such id exists) and false otherwise
-
getBuildTriggersCollection
@NotNull public Collection<BuildTriggerDescriptor> getBuildTriggersCollection()
Description copied from interface:BuildTypeSettings
Returns collection of build trigger settings- Specified by:
getBuildTriggersCollection
in interfaceBuildTypeSettings
- Returns:
- see above
-
findTriggerById
public BuildTriggerDescriptor findTriggerById(@NotNull String triggerId)
Description copied from interface:BuildTypeSettings
Finds build trigger descriptor by its' id- Specified by:
findTriggerById
in interfaceBuildTypeSettings
- Parameters:
triggerId
- id of the trigger- Returns:
- build trigger descriptor or null if trigger with such id not found
-
attachedToModel
public void attachedToModel(@NotNull ProjectDataModel projectDataModel)
- Specified by:
attachedToModel
in interfaceBuildTypeEx
-
getHistory
public List<SFinishedBuild> getHistory()
Description copied from interface:SBuildType
- Specified by:
getHistory
in interfaceSBuildType
- Returns:
- all non-cancelled builds non-personal builds for this build configuration, ordered by build start time descending (recent first)
-
getHistoryFull
public List<SFinishedBuild> getHistoryFull(boolean orderByChanges)
Description copied from interface:SBuildType
- Specified by:
getHistoryFull
in interfaceSBuildType
- Parameters:
orderByChanges
- if true, builds are ordered by changes, i.e. most recent build with recent changes goes first; if false, most recent builds go first, regardless change order- Returns:
- all (including cancelled and personal builds) for this build configuration, ordered according to orderByChanges parameter.
-
getHistory
public List<SFinishedBuild> getHistory(@Nullable User user, boolean includeCanceled, boolean orderByChanges)
Description copied from interface:SBuildType
Returns all finished builds, visible for the specified user of this configuration.- Specified by:
getHistory
in interfaceSBuildType
- Parameters:
user
- specified user. If user isnull
no personal builds will be included into the list, otherwise there will be personal builds for the specified user.
includeCanceled
- if canceled builds should be included.orderByChanges
- if true, builds are ordered by changes, i.e. most recent build with recent changes goes first; if false, most recent builds go first, regardless change order- Returns:
- list of all finished builds sorted according to orderByChanges field.
-
processHistoryEntries
public void processHistoryEntries(@NotNull ItemProcessor<SFinishedBuild> itemProcessor)
Description copied from interface:BuildTypeEx
Invokes the given ItemProcessor for all history records of this build type. Entries are pushed into the processor in changes order.- Specified by:
processHistoryEntries
in interfaceBuildTypeEx
- Parameters:
itemProcessor
- processor for history entries
-
getDetectedChanges
@NotNull public List<ChangeDescriptor> getDetectedChanges(@NotNull SelectPrevBuildPolicy prevBuildPolicy)
- Specified by:
getDetectedChanges
in interfaceBuildTypeEx
-
getDetectedChanges
@NotNull public List<ChangeDescriptor> getDetectedChanges(@NotNull SelectPrevBuildPolicy prevBuildPolicy, @Nullable Boolean includeDependencyChanges)
- Specified by:
getDetectedChanges
in interfaceBuildTypeEx
-
getLastChangesStartedBuild
@Nullable public SBuild getLastChangesStartedBuild()
Description copied from interface:SBuildType
Returns instance of the build, finished or running, which contains latest changes in this build configuration- Specified by:
getLastChangesStartedBuild
in interfaceSBuildType
- Returns:
- build with latest changes
-
getLastChangesFinished
@Nullable public SFinishedBuild getLastChangesFinished()
Description copied from interface:BuildType
Returns last finished instance for the build configuration with last user changes (personal builds and canceled builds are excluded).- Specified by:
getLastChangesFinished
in interfaceBuildType
- Specified by:
getLastChangesFinished
in interfaceSBuildType
- Returns:
- last finished build (ordered by changes) from the default branch.
-
getLastChangesSuccessfullyFinished
@Nullable public SFinishedBuild getLastChangesSuccessfullyFinished()
Description copied from interface:BuildType
Returns last successfully finished build in the configuration with last user changes, personal builds are not considered- Specified by:
getLastChangesSuccessfullyFinished
in interfaceBuildType
- Specified by:
getLastChangesSuccessfullyFinished
in interfaceSBuildType
- Returns:
- last successfully finished build (ordered by changes) from the default branch.
-
getOwnDependencies
@NotNull public List<Dependency> getOwnDependencies()
Description copied from interface:SBuildType
Returns list of own dependencies (not inherited from a template).- Specified by:
getOwnDependencies
in interfaceSBuildType
- Returns:
- list of own dependencies
-
getCustomDataStorage
@NotNull public CustomDataStorage getCustomDataStorage(@NotNull String storageId)
Description copied from interface:SBuildType
Returns custom data storage associated with this build configuration. Custom data storage allows to attach custom data to a build configuration. Example of custom data is a state of some plugin associated with this build type (not configuration of the plugin). Custom data will be automatically cleaned when build configuration is removed.- Specified by:
getCustomDataStorage
in interfaceSBuildType
- Parameters:
storageId
- - id of the storage. Custom data storageIds starting with "teamcity" are reserved for TeamCity internal usages. To reduce probability of identifiers clashing plugins can use fully qualified names of their classes or package names as storageId.- Returns:
- custom data storage
-
checkObsolete
protected void checkObsolete()
- Specified by:
checkObsolete
in classBaseBuildTypeIdentity
-
warnObsolete
protected void warnObsolete()
- Specified by:
warnObsolete
in classBaseBuildTypeIdentity
-
persistInternal
protected void persistInternal(@NotNull ConfigAction cause) throws PersistFailedException
- Specified by:
persistInternal
in classBaseBuildTypeIdentity
- Throws:
PersistFailedException
-
persistInternal
protected void persistInternal(@NotNull BackgroundPersistTask task) throws PersistFailedException
- Specified by:
persistInternal
in classBaseBuildTypeIdentity
- Throws:
PersistFailedException
-
getConfigHistory
@NotNull protected FileHistory getConfigHistory() throws IOException
- Specified by:
getConfigHistory
in classBaseBuildTypeIdentity
- Throws:
IOException
-
logChangedConfigToAudit
protected void logChangedConfigToAudit(@NotNull ConfigAction cause, @Nullable String description, int versionAfter)
- Specified by:
logChangedConfigToAudit
in classBaseBuildTypeIdentity
-
persistAuxiliaryData
public void persistAuxiliaryData()
- Specified by:
persistAuxiliaryData
in classBaseBuildTypeIdentity
-
getResolvedSettings
@NotNull public ResolvedSettings getResolvedSettings()
Description copied from interface:SBuildType
Returns resolved settings of this build configuration (with parameter references substituted)- Specified by:
getResolvedSettings
in interfaceSBuildType
- Returns:
- see above
-
getBuildTriggerDescriptors
@NotNull public Collection<BuildTriggerDescriptor> getBuildTriggerDescriptors(@NotNull String triggerName, boolean enabledOnly)
- Specified by:
getBuildTriggerDescriptors
in interfaceBuildTypeEx
- Parameters:
triggerName
- name of the triggerenabledOnly
- whether to return only enabled triggers or all- Returns:
- build triggers of specified type
-
getResolvedBuildTriggerDescriptors
@NotNull public Collection<BuildTriggerDescriptor> getResolvedBuildTriggerDescriptors(boolean enabledOnly)
- Specified by:
getResolvedBuildTriggerDescriptors
in interfaceBuildTypeEx
- Parameters:
enabledOnly
- whether to return only enabled triggers or all- Returns:
- build triggers with resolved settings.
-
getResolvedBuildTriggerDescriptors
@NotNull public Collection<BuildTriggerDescriptor> getResolvedBuildTriggerDescriptors(@NotNull String triggerName, boolean enabledOnly)
- Specified by:
getResolvedBuildTriggerDescriptors
in interfaceBuildTypeEx
- Parameters:
triggerName
- name of the triggerenabledOnly
- whether to return only enabled triggers or all- Returns:
- build triggers of specified type with fully resolved settings.
-
getPendingChangesInAllBranches
@NotNull public List<ChangeDescriptor> getPendingChangesInAllBranches(@Nullable Boolean includeDepChanges)
Description copied from interface:BuildTypeEx
Returns pending changes detected in all branches of this build configuration.- Specified by:
getPendingChangesInAllBranches
in interfaceBuildTypeEx
- Returns:
- list of pending changes.
-
getPendingChangesInAllBranches
@NotNull public List<ChangeDescriptor> getPendingChangesInAllBranches(@Nullable Boolean includeDependencyChanges, @NotNull VcsModificationProcessor callback)
- Specified by:
getPendingChangesInAllBranches
in interfaceBuildTypeEx
-
getDummyBuild
@NotNull public DummyBuild getDummyBuild()
- Specified by:
getDummyBuild
in interfaceBuildTypeEx
-
getDummyBuildPromotion
@NotNull public DummyBuildPromotion getDummyBuildPromotion()
- Specified by:
getDummyBuildPromotion
in interfaceBuildTypeEx
-
getDummyBuildPromotion
@Nullable public DummyBuildPromotion getDummyBuildPromotion(boolean createIfNotExists)
- Specified by:
getDummyBuildPromotion
in interfaceBuildTypeEx
-
resetPendingChanges
public void resetPendingChanges()
- Specified by:
resetPendingChanges
in interfaceBuildTypeEx
-
getValueResolver
@NotNull public ValueResolver getValueResolver()
Description copied from interface:ParametersSupport
Returns value resolver which can be used to resolve references in values- Specified by:
getValueResolver
in interfaceParametersSupport
- Returns:
- value resolver
-
moveToProject
public void moveToProject(@NotNull SProject target, boolean changeScopeOfLocalRoots) throws InvalidVcsRootScopeException
Description copied from interface:SBuildType
Moves this build configuration to thetarget
project.- Specified by:
moveToProject
in interfaceSBuildType
- Parameters:
target
- the destination projectchangeScopeOfLocalRoots
- not used since 8.0- Throws:
InvalidVcsRootScopeException
- thrown since 8.0 if VCS roots used by this configuration will not be accessible in the target project
-
moveToProject
public void moveToProject(@NotNull SProject target) throws InvalidVcsRootScopeException
Description copied from interface:SBuildType
Moves this build configuration to thetarget
project.- Specified by:
moveToProject
in interfaceSBuildType
- Parameters:
target
- the destination project- Throws:
InvalidVcsRootScopeException
- if VCS roots used by this configuration will not be accessible in the target project
-
moveToProject
public void moveToProject(@NotNull ConfigAction cause, @NotNull SProject targetProject)
Description copied from interface:SBuildType
Moves this build configuration to thetarget
project.- Specified by:
moveToProject
in interfaceSBuildType
- Parameters:
cause
- config action caused the changetargetProject
- the destination project
-
getParametersProvider
@NotNull public ParametersProvider getParametersProvider()
Description copied from interface:ParametersSupport
Returns parameters which can be used by value resolver. Note that some of the parameters may not have values defined because sometimes values can be calculated on the agent side only.- Specified by:
getParametersProvider
in interfaceParametersSupport
- Returns:
- parameters
-
getBuildByBuildNumber
@Nullable public Build getBuildByBuildNumber(@NotNull String buildNumber)
Description copied from interface:BuildType
Returns most recent build instance with specified build number. Generally, build number is unique but duplicates may happen if manually reset at build configuration page.- Specified by:
getBuildByBuildNumber
in interfaceBuildType
- Parameters:
buildNumber
- specified build number.- Returns:
- most recent build instance with the given number.
-
getBuildParameter
public String getBuildParameter(String key)
Description copied from interface:BuildType
Returns build parameter by parameter key- Specified by:
getBuildParameter
in interfaceBuildType
- Specified by:
getBuildParameter
in interfaceBuildTypeSettings
- Parameters:
key
- parameter key- Returns:
- build parameter by parameter key
-
getAgentCompatibilities
public List<AgentCompatibility> getAgentCompatibilities()
Description copied from interface:SBuildType
Returns information about what agent are compatible with the configuration, what are incompatible and why.AgentCompatibility
are provided for all authorized agents.- Specified by:
getAgentCompatibilities
in interfaceSBuildType
- Returns:
- list of compatibility information holders.
-
getCanRunAgents
public List<BuildAgentEx> getCanRunAgents()
Description copied from interface:SBuildType
Returns list of agents where this build configuration can run. Build configuration can run on an agent if this agent is authorized and if agent run policyBuildAgentManager.RunConfigurationPolicy
allows to run this build configuration. Note that this method does not consider agent pool associations.- Specified by:
getCanRunAgents
in interfaceSBuildType
- Returns:
- list of agents where this build configuration can run sorted by agent name
-
getCanRunAndCompatibleAgents
public List<BuildAgentEx> getCanRunAndCompatibleAgents(boolean includeDisabled)
Collects registered compatible agents where this build configuration is allowed to run.- Specified by:
getCanRunAndCompatibleAgents
in interfaceSBuildType
- Parameters:
includeDisabled
- true to include disabled agents in the list, by default they are excluded- Returns:
- list of agents ordered by their names.
-
getBuildNumbers
public BuildNumbers getBuildNumbers()
Description copied from interface:SBuildType
Returns interface to manipulate current build counter- Specified by:
getBuildNumbers
in interfaceSBuildType
- Returns:
- see above
-
getResponsibilityInfo
@NotNull public ResponsibilityEntry getResponsibilityInfo()
Description copied from interface:BuildType
Returns the information about responsibility on this build configuration.- Specified by:
getResponsibilityInfo
in interfaceBuildType
- Returns:
- ResponsibilityEntry information for this build configuration
- See Also:
ResponsibilityEntry
,BuildType.setResponsible(User, String, User)
,BuildType.removeResponsible(boolean, User, String, User)
-
setResponsible
public void setResponsible(@NotNull User responsibleUser, @Nullable String userComment, @Nullable User reporterUser)
Description copied from interface:BuildType
Called when a user takes a responsibility for the build type.Clients are encouraged to use
BuildTypeResponsibilityFacade
service when possible, as it provides more flexibility.- Specified by:
setResponsible
in interfaceBuildType
- Parameters:
responsibleUser
- responsible user. Not nulluserComment
- user message. Will be shown in UIreporterUser
- user who performs the action. May be null for automated operations
-
removeResponsible
public void removeResponsible(boolean buildWasFixed, @Nullable User responsibleUser, @Nullable String comment, @Nullable User whoPerformsTheAction)
Description copied from interface:BuildType
Removes responsible information , mark it is either 'fixed' or 'not fixed'.Clients are encouraged to use
BuildTypeResponsibilityFacade
service when possible, as it provides more flexibility.- Specified by:
removeResponsible
in interfaceBuildType
- Parameters:
buildWasFixed
- if true, build configuration will be marked as fixedresponsibleUser
- User who performs the action. May be null for automated operationscomment
- user message. Will be shown in UIwhoPerformsTheAction
- user who performs the action. May be null for automated operations
-
getCheckoutType
@NotNull public BuildTypeDescriptor.CheckoutType getCheckoutType()
Description copied from interface:BuildTypeDescriptor
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.- Specified by:
getCheckoutType
in interfaceBuildTypeDescriptor
- Specified by:
getCheckoutType
in interfaceBuildTypeSettings
- Returns:
- method to get sources on agent.
-
getCheckoutDirectory
public String getCheckoutDirectory()
Description copied from interface:BuildTypeSettings
Returns build checkout directory - if specified explicitly using
BuildTypeSettings.setCheckoutDirectory(String)
. Returnsnull
if default checkout directory, generated by TeamCity should be used.- Specified by:
getCheckoutDirectory
in interfaceBuildTypeSettings
- Returns:
- build checkout directory.
- See Also:
BuildTypeSettings.setCheckoutDirectory(String)
-
setArtifactPaths
public void setArtifactPaths(@Nullable String artifactPaths)
Description copied from interface:BuildTypeSettings
Sets build artifact paths. Artifact paths are comma separated paths to build artifacts. Support ant-style wildcards and target directories like *.zip => winFiles,unix/dist.tgz => linuxFiles, where winFiles and linuxFiles are target directories. Set to null or empty string to disable artifacts processing.- Specified by:
setArtifactPaths
in interfaceBuildTypeSettings
- Parameters:
artifactPaths
- paths to build artifacts
-
getArtifactPaths
@Nullable public String getArtifactPaths()
Description copied from interface:BuildTypeSettings
Returns build artifact paths.- Specified by:
getArtifactPaths
in interfaceBuildTypeSettings
- Returns:
- build artifact paths
-
getSourceBuildType
@NotNull public SBuildType getSourceBuildType()
Description copied from interface:BuildTypeEx
If current instance is an instance of RemoteBuildType - returns base configuration for remote build type, otherwise - returns this.- Specified by:
getSourceBuildType
in interfaceBuildTypeEx
- Specified by:
getSourceBuildType
in interfaceLVcsRootInstanceHolderEx
- Returns:
- see below.
-
getProject
@NotNull public ProjectEx getProject()
Description copied from class:BaseBuildTypeIdentity
Returns the project this build type entity belongs to.- Specified by:
getProject
in interfaceBuildTypeEx
- Specified by:
getProject
in interfaceBuildTypeIdentity
- Specified by:
getProject
in interfaceBuildTypeSettings
- Specified by:
getProject
in interfaceSBuildType
- Overrides:
getProject
in classBaseBuildTypeIdentity
- Returns:
- the project this build type entity belongs to.
-
buildPatch
public void buildPatch(RunningBuildEx runningBuild, FullCheckoutFlag fullCheckoutFlag, LowLevelPatchBuilder builder, BuildServerEx buildServer, VcsStatusLogger vcsStatusLogger, @NotNull AgentCheckoutDirRevisionInfo dirInfo) throws IOException
- Throws:
IOException
-
newRunningBuild
@NotNull public RunningBuildEx newRunningBuild(@NotNull QueuedBuildEx queuedBuild, @Nullable SBuildAgent buildAgent, @NotNull Date removeFromQueueTime)
Description copied from interface:BuildTypeEx
Creates new SRunningBuild instance.- Specified by:
newRunningBuild
in interfaceBuildTypeEx
- Parameters:
queuedBuild
- source queued buildbuildAgent
- agent the build will be running on or null if build is agent lessremoveFromQueueTime
- time when build was removed from the queue- Returns:
- the new running build
-
newAgentLessBuild
@NotNull public RunningBuildEx newAgentLessBuild(@NotNull QueuedBuildEx queuedBuild, @Nullable SBuildAgent buildAgent, @NotNull Date removeFromQueueTime)
Description copied from interface:BuildTypeEx
Creates new SRunningBuild instance and sets executor name as a build promotion attribute for the purposes of Executor mode builds.- Specified by:
newAgentLessBuild
in interfaceBuildTypeEx
- Parameters:
queuedBuild
- source queued buildbuildAgent
- agent the build will be running on or null if build is agent lessremoveFromQueueTime
- time when build was removed from the queue- Returns:
- the new running build
-
isPersonal
public boolean isPersonal()
Description copied from interface:BuildTypeDescriptor
Returns if the configuration is temporary created for the personal build.- Specified by:
isPersonal
in interfaceBuildTypeDescriptor
- Returns:
- true if configuration was created to run some personal changes. Such sort of configurations are not available from an administrative interface, only for internal usage.
-
isCleanBuild
public boolean isCleanBuild()
Description copied from interface:SBuildType
Returns if all files on an agent machine should be deleted before the build is started.- Specified by:
isCleanBuild
in interfaceSBuildType
- Returns:
- true, if agent has to clean all sources and download all sources from the server before each build of the configuration.
- See Also:
BuildTypeOptions.BT_CLEAN_BUILD
-
getOption
@NotNull public <T> T getOption(@NotNull Option<T> option)
Description copied from interface:OptionSupport
Get option value- Specified by:
getOption
in interfaceOptionSupport
- Parameters:
option
- option to retrieve value for- Returns:
- value of the option. If value wasn't set, Option:getDefaultValue is returned
-
getOptionDefaultValue
@NotNull public <T> T getOptionDefaultValue(@NotNull Option<T> option)
- Specified by:
getOptionDefaultValue
in interfaceOptionSupport
- Parameters:
option
- option whose default value to return- Returns:
- default value for specified option
-
setOption
public <T> void setOption(@NotNull Option<T> option, @NotNull T value)
Description copied from interface:OptionSupport
Set option value, clears value if it is the same as default- Specified by:
setOption
in interfaceOptionSupport
- Parameters:
option
- option to set value forvalue
- option value
-
getOwnOptions
@NotNull public Collection<Option> getOwnOptions()
Description copied from interface:OptionSupport
Return options defined in this object, i.e. options for which some value has been set usingOptionSupport.setOption(Option, Object)
method.- Specified by:
getOwnOptions
in interfaceOptionSupport
- Returns:
- see above
-
getOptions
@NotNull public Collection<Option> getOptions()
- Specified by:
getOptions
in interfaceOptionSupport
- Returns:
- combined set of options - own and inherited
-
getChangedOptions
@NotNull public Option[] getChangedOptions()
Description copied from interface:OptionSupport
Return options with changed values, i.e. options with non-default values- Specified by:
getChangedOptions
in interfaceOptionSupport
- Returns:
- see above
-
getDependencies
@NotNull public List<Dependency> getDependencies()
Description copied from interface:DependencySettings
Get existing dependencies, empty collection when no dependencies exist- Specified by:
getDependencies
in interfaceDependencySettings
- Returns:
- see above
-
getDependencyReferences
@NotNull public List<SBuildType> getDependencyReferences()
Description copied from interface:SBuildType
Returns list of build configurations directly referencing this build configuration. The returned list is filtered by current user permissions and may contain not all references.- Specified by:
getDependencyReferences
in interfaceSBuildType
- Returns:
- see above
-
getTransitiveDependedOnMe
@NotNull public List<SBuildType> getTransitiveDependedOnMe()
Description copied from interface:BuildTypeEx
Returns all build configurations collected up the dependency chain. Note that returned dependencies are sorted by the distance from this build type. The returned list is filtered by current user permissions and may contain not all references.- Specified by:
getTransitiveDependedOnMe
in interfaceBuildTypeEx
-
traverseDependedOnMe
public void traverseDependedOnMe(@NotNull DependencyConsumer<BuildTypeEx> consumer)
- Specified by:
traverseDependedOnMe
in interfaceBuildTypeEx
-
traverseDependencies
public void traverseDependencies(@NotNull DependencyConsumer<BuildTypeEx> consumer)
- Specified by:
traverseDependencies
in interfaceBuildTypeEx
-
traverseSelfAndDependencies
public void traverseSelfAndDependencies(@NotNull DependencyConsumer<BuildTypeEx> consumer)
- Specified by:
traverseSelfAndDependencies
in interfaceBuildTypeEx
-
traverseSelfAndDependedOnMe
public void traverseSelfAndDependedOnMe(@NotNull DependencyConsumer<BuildTypeEx> consumer)
- Specified by:
traverseSelfAndDependedOnMe
in interfaceBuildTypeEx
-
getRawDependedOnMe
@NotNull public Map<String,DependencyOptions> getRawDependedOnMe()
Description copied from interface:BuildTypeEx
Map from internal build type id to dependency options- Specified by:
getRawDependedOnMe
in interfaceBuildTypeEx
- Returns:
-
getDependedOnMe
@NotNull public Map<SBuildType,DependencyOptions> getDependedOnMe()
- Specified by:
getDependedOnMe
in interfaceBuildTypeEx
- Returns:
- same as
BuildTypeEx.getRawDependedOnMe()
but with actual build types.
-
getChildDependencies
@NotNull public Collection<SBuildType> getChildDependencies()
Description copied from interface:Dependent
Returns all child dependencies collected down the chain. Note that returned dependencies are sorted by depth in the chain. Note that returned collection will contain accessible by current authority holder objects only.- Specified by:
getChildDependencies
in interfaceDependent
- Returns:
- see above
-
getNumberOfDependencyReferences
public int getNumberOfDependencyReferences()
Description copied from interface:SBuildType
Returns number of dependency references (the number includes all references even those which are not available because of permissions)- Specified by:
getNumberOfDependencyReferences
in interfaceSBuildType
- Returns:
- see above
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in interfaceBuildTypeSettings
- Specified by:
isReadOnly
in interfaceSPersistentEntity
- Returns:
- true if this entity settings are in read only mode
-
getReadOnlyReason
@Nullable public ReadOnlyReason getReadOnlyReason()
- Specified by:
getReadOnlyReason
in interfaceBuildTypeSettings
- Specified by:
getReadOnlyReason
in interfaceSPersistentEntity
- Returns:
- reason why this entity settings are in read only state or null if they are not read only
-
addDependency
public void addDependency(@NotNull Dependency dependOn)
Description copied from interface:DependencySettings
Add dependency on another build configuration- Specified by:
addDependency
in interfaceDependencySettings
- Parameters:
dependOn
- new dependency
-
removeDependency
public boolean removeDependency(@NotNull Dependency dependOn)
Description copied from interface:DependencySettings
Remove dependency on another build configuration- Specified by:
removeDependency
in interfaceDependencySettings
- Parameters:
dependOn
- dependency to remove- Returns:
- true if dependency was actually removed
-
intersectsWith
public boolean intersectsWith(@NotNull Dependent dependent)
Description copied from interface:Dependent
Returns true if this object dependencies intersect (have same nodes) with specified object dependencies.- Specified by:
intersectsWith
in interfaceDependent
- Parameters:
dependent
- another object- Returns:
- see above
-
getArtifactDependencies
@NotNull public List<SArtifactDependency> getArtifactDependencies()
Description copied from interface:BuildTypeSettings
Returns artifacts this build configuration depending on.- Specified by:
getArtifactDependencies
in interfaceBuildTypeSettings
- Returns:
- list of artifacts this build configuration depending on
-
getArtifactsReferences
public List<SBuildType> getArtifactsReferences()
Description copied from interface:SBuildType
Returns list of build configurations which depend on this build configurations artifacts- Specified by:
getArtifactsReferences
in interfaceSBuildType
- Returns:
- list of build configurations
-
getNumberOfArtifactReferences
public int getNumberOfArtifactReferences()
Description copied from interface:SBuildType
Returns number of dependent build configuration having references to this build configuration. This number may be greater than the size of the listSBuildType.getArtifactsReferences()
because it takes into account all dependent build configurations whileSBuildType.getArtifactsReferences()
returns only build configurations accessible to an authority currently set in the security context.- Specified by:
getNumberOfArtifactReferences
in interfaceSBuildType
- Returns:
- see above
-
setArtifactDependencies
public void setArtifactDependencies(@NotNull List<SArtifactDependency> artifacts)
Description copied from interface:BuildTypeSettings
Sets artifacts this build configuration depending on.- Specified by:
setArtifactDependencies
in interfaceBuildTypeSettings
- Parameters:
artifacts
- new artifacts dependency list.
-
addArtifactDependency
public void addArtifactDependency(@NotNull SArtifactDependency dependency)
Description copied from interface:BuildTypeSettings
Adds artifact dependency.- Specified by:
addArtifactDependency
in interfaceBuildTypeSettings
- Parameters:
dependency
- new artifact dependency
-
removeArtifactDependency
public void removeArtifactDependency(@NotNull SArtifactDependency dependency)
Description copied from interface:BuildTypeSettings
Removes artifact dependency.- Specified by:
removeArtifactDependency
in interfaceBuildTypeSettings
- Parameters:
dependency
- artifact dependency
-
getArtifactsDirectory
@NotNull public File getArtifactsDirectory()
Description copied from interface:SBuildType
Returns directory containing artifacts of this build configuration.- Specified by:
getArtifactsDirectory
in interfaceSBuildType
- Returns:
- artifacts directory on the server.
-
nameChanged
protected void nameChanged(@NotNull String oldName, @NotNull String newName)
- Specified by:
nameChanged
in classBaseBuildTypeIdentity
-
sendPersistedEvents
protected void sendPersistedEvents(@NotNull ConfigAction cause)
- Overrides:
sendPersistedEvents
in classBaseBuildTypeIdentity
-
addCleanupPolicy
public void addCleanupPolicy(@NotNull HistoryRetentionPolicy policy)
Description copied from interface:CleanupSettingsInit
Sets cleanup policy for this build configuration- Specified by:
addCleanupPolicy
in interfaceCleanupSettingsInit
- Parameters:
policy
- policy to set
-
removeCleanupPolicies
public void removeCleanupPolicies()
Description copied from interface:CleanupSettingsInit
Remove all own cleanup policies for the object- Specified by:
removeCleanupPolicies
in interfaceCleanupSettingsInit
-
setCleanupOption
public void setCleanupOption(@NotNull String option, @Nullable Boolean value)
Description copied from interface:CleanupSettingsInit
Sets value for a cleanup option- Specified by:
setCleanupOption
in interfaceCleanupSettingsInit
- Parameters:
option
- cleanup option (seeCleanupSettings
constants)value
- value to set option to, ornull
to remove the option
-
getCleanupPolicies
@NotNull public Collection<HistoryRetentionPolicy> getCleanupPolicies()
- Specified by:
getCleanupPolicies
in interfaceCleanupSettings
- Returns:
- combined cleanup policies, including those inherited from default or parent object
-
getOwnCleanupPolicies
@NotNull public Collection<HistoryRetentionPolicy> getOwnCleanupPolicies()
- Specified by:
getOwnCleanupPolicies
in interfaceCleanupSettings
- Returns:
- cleanup policies, specific for this object only
-
getInheritedCleanupPolicies
@NotNull public Collection<HistoryRetentionPolicy> getInheritedCleanupPolicies()
- Specified by:
getInheritedCleanupPolicies
in interfaceCleanupSettings
-
getInheritedCleanupOptions
@NotNull public Map<String,Boolean> getInheritedCleanupOptions()
- Specified by:
getInheritedCleanupOptions
in interfaceCleanupSettings
-
getCleanupOptions
@NotNull public Map<String,Boolean> getCleanupOptions()
- Specified by:
getCleanupOptions
in interfaceCleanupSettings
- Returns:
- map of all cleanup options
-
getOwnCleanupOptions
@NotNull public Map<String,Boolean> getOwnCleanupOptions()
- Specified by:
getOwnCleanupOptions
in interfaceCleanupSettings
- Returns:
- map of own cleanup options only
-
setDirtyCompatibility
public void setDirtyCompatibility()
-
compareTo
public int compareTo(@NotNull BuildTypeDescriptor descriptor)
- Specified by:
compareTo
in interfaceComparable<BuildTypeDescriptor>
-
compareBuildTypes
public static int compareBuildTypes(@NotNull BuildTypeDescriptor buildType1, @NotNull BuildTypeDescriptor buildType2)
-
getBranches
@NotNull public List<BranchEx> getBranches(@NotNull BranchesPolicy policy, @Nullable Boolean includeBranchesFromDependencies)
- Specified by:
getBranches
in interfaceBuildTypeEx
-
getBranches
@NotNull public List<BranchEx> getBranches(@NotNull BranchesPolicy policy, @Nullable Boolean includeBranchesFromDependencies, boolean computeTimestamps)
- Specified by:
getBranches
in interfaceBuildTypeEx
-
getBranches
@NotNull public List<BranchEx> getBranches(@NotNull BranchCalculationOptions branchCalculationOptions)
- Specified by:
getBranches
in interfaceBuildTypeEx
-
getBranch
@NotNull public BranchEx getBranch(@NotNull String name)
- Specified by:
getBranch
in interfaceBuildTypeEx
-
isValidVcsBranch
public boolean isValidVcsBranch(@NotNull String name, boolean includeBranchesFromDependencies)
- Specified by:
isValidVcsBranch
in interfaceBuildTypeEx
-
getOwnVcsBranchNames
@NotNull public Collection<String> getOwnVcsBranchNames(boolean activeOnly)
- Specified by:
getOwnVcsBranchNames
in interfaceBuildTypeEx
-
hasOwnBranches
public boolean hasOwnBranches()
- Specified by:
hasOwnBranches
in interfaceBuildTypeEx
-
getActiveBranches
@NotNull public List<BranchEx> getActiveBranches()
- Specified by:
getActiveBranches
in interfaceBuildTypeEx
-
getBranchSpec
@NotNull public BranchSpec getBranchSpec(@NotNull LVcsRootInstance root)
- Specified by:
getBranchSpec
in interfaceLVcsRootInstanceHolderEx
-
getAdditionalBranchSpecs
@NotNull public List<BranchSpec> getAdditionalBranchSpecs(@NotNull LVcsRootInstance root, @NotNull VcsRepositoryState state)
- Specified by:
getAdditionalBranchSpecs
in interfaceLVcsRootInstanceHolderEx
-
getAdditionalBranchesForChangesCollecting
@NotNull public Set<String> getAdditionalBranchesForChangesCollecting(@NotNull LVcsRootInstance root, @NotNull VcsRepositoryState state)
- Specified by:
getAdditionalBranchesForChangesCollecting
in interfaceLVcsRootInstanceHolderEx
-
getBranchSpec
@NotNull public BranchSpec getBranchSpec(@NotNull VcsRootInstance root)
- Specified by:
getBranchSpec
in interfaceBuildTypeEx
-
getBranchSpec
@NotNull public BranchSpec getBranchSpec(@NotNull SVcsRoot parentRoot)
Description copied from interface:BuildTypeEx
Returns branch specification for specified parent root- Specified by:
getBranchSpec
in interfaceBuildTypeEx
- Parameters:
parentRoot
- root of interest- Returns:
- see above
-
getLastUsedBranchSpec
@NotNull public BranchSpec getLastUsedBranchSpec(@NotNull SVcsRoot parentRoot)
Description copied from interface:BuildTypeEx
Returns branch specification used for changes collecting in given VCS root. If changes are not collected yet returns current value of branch specification.- Specified by:
getLastUsedBranchSpec
in interfaceBuildTypeEx
- Parameters:
parentRoot
- root of interest- Returns:
- see above
-
rememberLastUsedRootInstanceAndBranchSpec
public boolean rememberLastUsedRootInstanceAndBranchSpec(@NotNull LVcsRootInstance root, @NotNull BranchSpec spec)
Description copied from interface:LVcsRootInstanceHolderEx
Stores branch specification used for changes collecting in given VCS root and resets a pending changes cache if root or spec is changed since last call to this method or whenforcePendingChangesReset
is true- Specified by:
rememberLastUsedRootInstanceAndBranchSpec
in interfaceLVcsRootInstanceHolderEx
spec
- branch specification- Returns:
- true if buildType's caches were updated
-
branchesChanged
public void branchesChanged(boolean currentNodeEvent, @NotNull Date branchChangeTimestamp)
Description copied from interface:LVcsRootInstanceHolderEx
Notifies build configuration that the branches may have changed.- Specified by:
branchesChanged
in interfaceLVcsRootInstanceHolderEx
branchChangeTimestamp
- the time when the branches were changed (usually this is the time when we started collecting changes)
-
branchesChanged
public static void branchesChanged(@NotNull Collection<BuildTypeEx> buildTypes, boolean currentNodeEvent, @NotNull Date branchChangeTimestamp, @NotNull CustomDataStorageManager customDataStorageManager)
-
getLastUsedBranchSpecMap
@NotNull public Map<VcsRootInstance,BranchSpec> getLastUsedBranchSpecMap()
- Specified by:
getLastUsedBranchSpecMap
in interfaceBuildTypeEx
-
getLastUsedBranchSpecMap
@NotNull public Map<VcsRootInstance,BranchSpec> getLastUsedBranchSpecMap(boolean includeSettingsRoot)
- Specified by:
getLastUsedBranchSpecMap
in interfaceBuildTypeEx
-
getAdditionalBranchSpecs
@NotNull public List<BranchSpec> getAdditionalBranchSpecs(@NotNull VcsRootInstance root, @NotNull VcsRepositoryState state)
- Specified by:
getAdditionalBranchSpecs
in interfaceBuildTypeEx
-
isBranchSpecDefined
public boolean isBranchSpecDefined(boolean processDependencies)
- Specified by:
isBranchSpecDefined
in interfaceBuildTypeEx
- Parameters:
processDependencies
- whether to process snapshot dependencies or not- Returns:
- true if at least one vcs root in build configuration or its dependencies has VCS root with non empty branch spec
-
isBranchSpecDefined
public boolean isBranchSpecDefined(boolean processDependencies, boolean processSettingsRoot)
- Specified by:
isBranchSpecDefined
in interfaceBuildTypeEx
-
isBranchSpecDefined
public static boolean isBranchSpecDefined(@NotNull Collection<? extends VcsRoot> vcsRoots, @NotNull ValueResolver valueResolver)
-
getBuildTypeOrderedBuilds
@NotNull public BuildTypeOrderedBuildsImpl getBuildTypeOrderedBuilds()
- Specified by:
getBuildTypeOrderedBuilds
in interfaceBuildTypeEx
-
clearPrevPromotionCache
public void clearPrevPromotionCache(@Nullable Collection<BuildPromotion> targetPromos)
- Specified by:
clearPrevPromotionCache
in interfaceBuildTypeEx
-
resetTagsCache
public void resetTagsCache()
-
isCheckoutOnServer
public boolean isCheckoutOnServer()
-
isCheckoutOnAgent
public boolean isCheckoutOnAgent()
-
getVcsRoots
@NotNull public List<SVcsRoot> getVcsRoots()
Description copied from interface:BuildType
Returns all roots currently attached to this configuration- Specified by:
getVcsRoots
in interfaceBuildType
- Specified by:
getVcsRoots
in interfaceBuildTypeSettings
- Returns:
- collection of all attached vcs roots.
-
containsVcsRoot
public boolean containsVcsRoot(long vcsRootId)
Description copied from interface:BuildTypeSettings
Returns true if VCS root with specified id is attached directly or is inherited via a template- Specified by:
containsVcsRoot
in interfaceBuildTypeSettings
- Parameters:
vcsRootId
- id of VCS root- Returns:
- see above
-
containsOwnVcsRoot
public boolean containsOwnVcsRoot(long vcsRootId)
Description copied from interface:BuildTypeSettings
Returns true if VCS root with specified id is attached directly and is not inherited via a template- Specified by:
containsOwnVcsRoot
in interfaceBuildTypeEx
- Specified by:
containsOwnVcsRoot
in interfaceBuildTypeSettings
- Parameters:
vcsRootId
- vcs root id- Returns:
- true if the specified VCS root is attached to the build configuration directly and is not inherited
-
updateRevisionsForOwnBranches
public void updateRevisionsForOwnBranches(@NotNull Collection<String> logicalBranchNames)
Description copied from interface:BuildTypeEx
Make sure that revisions for specified logical branches are calculated and saved in dummy build promotions. These revisions are used to compute pending changes, so if some code is going to compute pending changes for a big amount of branches it makes sense to call this method first.- Specified by:
updateRevisionsForOwnBranches
in interfaceBuildTypeEx
-
getVcsRootEntries
@NotNull public List<VcsRootEntry> getVcsRootEntries()
Description copied from interface:BuildTypeSettings
Returns all entries of vcs roots. Each entry contains reference to root and its checkout rules.- Specified by:
getVcsRootEntries
in interfaceBuildTypeSettings
- Returns:
- all entries of vcs roots for this configuration
-
addVcsRoot
public boolean addVcsRoot(@NotNull SVcsRoot root)
Description copied from interface:BuildTypeSettings
Adds VCS root to the build configuration with default checkout rules.- Specified by:
addVcsRoot
in interfaceBuildTypeSettings
- Parameters:
root
- VCS root to add- Returns:
- true if VCS root was actually added and false otherwise (this VCS root already exists)
-
removeVcsRoot
public boolean removeVcsRoot(@NotNull SVcsRoot root)
Description copied from interface:BuildTypeSettings
Removes existing VCS root from the build configuration. If there were checkout rules attached to this VCS root they will be removed too.- Specified by:
removeVcsRoot
in interfaceBuildTypeSettings
- Parameters:
root
- VCS root to remove- Returns:
- true if VCS root was actually removed from the build configuration and false if build configuration did not have this vcs root attached
-
replaceVcsRoot
public boolean replaceVcsRoot(@NotNull SVcsRoot oldVcsRoot, @NotNull SVcsRoot newVcsRoot)
Description copied from interface:BuildTypeEx
Replaces existing VCS root entry in settings with a new one, maintaining the order of the root entries- Specified by:
replaceVcsRoot
in interfaceBuildTypeEx
- Parameters:
oldVcsRoot
- VCS root to be replacednewVcsRoot
- VCS root to insert instead- Returns:
- true if VCS root was actually replaced, false otherwise (the root to be replaced did not exist or the new root already existed)
-
setVcsRoots
public boolean setVcsRoots(@NotNull Collection<SVcsRoot> vcsRoots)
Description copied from interface:BuildTypeEx
Sets VCS roots. All existing VCS roots that are not present in vcsRoots are deleted, all other existing VCS roots are reordered if necessary, but retain their original checkout rules.- Specified by:
setVcsRoots
in interfaceBuildTypeEx
- Returns:
- true if any changes occurred
-
setEditable
public void setEditable(boolean editable)
Description copied from interface:BuildTypeEx
Enables or disables editing of the build type in web UI, see alsoSPersistentEntity.isReadOnly()
.SBuildType.persist()
method must be called afterwards.- Specified by:
setEditable
in interfaceBuildTypeEx
- Parameters:
editable
- true to enable editing and false to disable
-
beforeAddVcsRoot
public void beforeAddVcsRoot(@NotNull SVcsRoot vcsRoot)
- Specified by:
beforeAddVcsRoot
in interfaceBuildTypeSettingsListener
-
afterAddVcsRoot
public void afterAddVcsRoot(@NotNull SVcsRoot vcsRoot)
- Specified by:
afterAddVcsRoot
in interfaceBuildTypeSettingsListener
-
beforeRemoveVcsRoot
public void beforeRemoveVcsRoot(@NotNull SVcsRoot vcsRoot)
- Specified by:
beforeRemoveVcsRoot
in interfaceBuildTypeSettingsListener
-
beforeAddDependency
public void beforeAddDependency(@NotNull Dependency dep)
- Specified by:
beforeAddDependency
in interfaceBuildTypeSettingsListener
-
afterRemoveVcsRoot
public void afterRemoveVcsRoot(@NotNull SVcsRoot root)
- Specified by:
afterRemoveVcsRoot
in interfaceBuildTypeSettingsListener
-
checkoutRulesChanged
public void checkoutRulesChanged(@NotNull SVcsRoot vcsRoot, @Nullable CheckoutRules oldRules, @NotNull CheckoutRules newRules)
- Specified by:
checkoutRulesChanged
in interfaceBuildTypeSettingsListener
-
afterAddDependency
public void afterAddDependency(@NotNull Dependency dep)
- Specified by:
afterAddDependency
in interfaceBuildTypeSettingsListener
-
dependencyReplaced
public void dependencyReplaced(@NotNull Dependency old, @NotNull Dependency newDep)
- Specified by:
dependencyReplaced
in interfaceBuildTypeSettingsListener
-
artifactDependenciesChanged
public void artifactDependenciesChanged()
- Specified by:
artifactDependenciesChanged
in interfaceBuildTypeSettingsListener
-
beforeRemoveDependency
public void beforeRemoveDependency(@NotNull Dependency dep)
- Specified by:
beforeRemoveDependency
in interfaceBuildTypeSettingsListener
-
afterRemoveDependency
public void afterRemoveDependency(@NotNull Dependency dep)
- Specified by:
afterRemoveDependency
in interfaceBuildTypeSettingsListener
-
beforeAddRequirement
public void beforeAddRequirement(@NotNull Requirement req)
- Specified by:
beforeAddRequirement
in interfaceBuildTypeSettingsListener
-
afterAddRequirement
public void afterAddRequirement(@NotNull Requirement req)
- Specified by:
afterAddRequirement
in interfaceBuildTypeSettingsListener
-
beforeRemoveRequirement
public void beforeRemoveRequirement(@NotNull Requirement req)
- Specified by:
beforeRemoveRequirement
in interfaceBuildTypeSettingsListener
-
afterRemoveRequirement
public void afterRemoveRequirement(@NotNull Requirement req)
- Specified by:
afterRemoveRequirement
in interfaceBuildTypeSettingsListener
-
afterAddBuildTrigger
public void afterAddBuildTrigger(@NotNull BuildTriggerDescriptor btd)
- Specified by:
afterAddBuildTrigger
in interfaceBuildTypeSettingsListener
-
afterRemoveBuildTrigger
public void afterRemoveBuildTrigger(@NotNull BuildTriggerDescriptor btd)
- Specified by:
afterRemoveBuildTrigger
in interfaceBuildTypeSettingsListener
-
afterUpdateBuildTrigger
public void afterUpdateBuildTrigger(@NotNull BuildTriggerDescriptor newTrigger, @NotNull BuildTriggerDescriptor oldTrigger)
- Specified by:
afterUpdateBuildTrigger
in interfaceBuildTypeSettingsListener
-
newBuildRunnersOrderApplied
public void newBuildRunnersOrderApplied(@NotNull String[] ids)
- Specified by:
newBuildRunnersOrderApplied
in interfaceBuildTypeSettingsListener
-
settingEnabledOrDisabled
public void settingEnabledOrDisabled(@NotNull String id, boolean enabled)
- Specified by:
settingEnabledOrDisabled
in interfaceBuildTypeSettingsListener
-
textValueChanged
public void textValueChanged()
Description copied from interface:BuildTypeSettingsListener
Called when a text value in a parameter has changed.- Specified by:
textValueChanged
in interfaceBuildTypeSettingsListener
-
resetDummyBuilds
public void resetDummyBuilds()
-
getBuildTypeBranches
@NotNull public BuildTypeBranches getBuildTypeBranches()
-
getCheckoutRules
public CheckoutRules getCheckoutRules(@NotNull VcsRoot root)
Description copied from interface:BuildTypeSettings
Returns checkout rules configured for the specified VCS root. If specified VCS root is not attached to this build configuration, then null is returned.- Specified by:
getCheckoutRules
in interfaceBuildTypeSettings
- Parameters:
root
- VCS root- Returns:
- checkout rules or null if specified VCS root is not attached to the build configuration
-
setCheckoutRules
public boolean setCheckoutRules(@NotNull VcsRoot root, @NotNull CheckoutRules rules)
Description copied from interface:BuildTypeSettings
Sets checkout rules for specified VCS root. VCS root must be attached to this build configuration.- Specified by:
setCheckoutRules
in interfaceBuildTypeSettings
- Parameters:
root
- root to set rules forrules
- checkout rules for the VCS root- Returns:
- true if checkout rules were set for the VCS root (if VCS root is attached) and false otherwise
-
getVcsSettingsHash
@Deprecated @NotNull public String getVcsSettingsHash(@NotNull List<VcsRootInstanceEntry> vcsRootEntries)
Deprecated.Description copied from interface:SBuildType
Return name of the directory which should be used as checkout directory for this build configuration if explicit checkout directory is not specified. In fact, this name is a generated hash which depends on VCS Roots associated with this build configuration and some other settings, such as CheckoutTypeBuildTypeDescriptor.getCheckoutType()
and checkout rulesBuildTypeSettings.getCheckoutRules(jetbrains.buildServer.vcs.VcsRoot)
Deprecated since 10.0, because for auto checkout mode this hash depends on effective checkout mode and is calculated on the agent. As a workaround, for auto checkout this method returns hash as if agent checkout is used.- Specified by:
getVcsSettingsHash
in interfaceSBuildType
- Parameters:
vcsRootEntries
- vcs roots with checkout rules to get name hash for.- Returns:
- name of the directory which will be used as last part of checkout directory
- See Also:
BuildTypeSettings.setCheckoutDirectory(String)
-
getVcsSettingsHash
@Deprecated @NotNull public String getVcsSettingsHash()
Deprecated.Description copied from interface:SBuildType
Returns build configuration vcs settings hash.
Note: be careful, when using this value for running build. Build type might already be updated Deprecated since 10.0, because for auto checkout mode this hash depends on effective checkout mode and is calculated on the agent. As a workaround, for auto checkout this method returns hash as if agent checkout is used.- Specified by:
getVcsSettingsHash
in interfaceSBuildType
- Returns:
- see above
-
getVcsRootsHash
@Deprecated @NotNull public String getVcsRootsHash()
Deprecated.Description copied from interface:SBuildType
Returns build configuration vcs roots hash without taking checkout directory into account
The resulting hash is an equal to the default checkout directory (since 10.0 it is true only for not auto checkout type). Note: be careful, when using this value for running build. Build type might already be updated Deprecated since 10.0, because for auto checkout mode this hash depends on effective checkout mode and is calculated on the agent. As a workaround, for auto checkout this method returns hash as if agent checkout is used.- Specified by:
getVcsRootsHash
in interfaceSBuildType
- Returns:
- see above
-
getVcsRootsHash
@NotNull public String getVcsRootsHash(BuildTypeDescriptor.CheckoutType checkoutType)
Description copied from interface:BuildTypeEx
Returns build configuration vcs roots hash without taking checkout directory into account
The resulting hash is an equal to the default checkout directory. Note: be careful, when using this value for running build. Build type might already be updated It's a replacement for deprecatedSBuildType.getVcsRootsHash()
- returns hash of vcs roots as if specified checkoutType is used. Don't acceptBuildTypeDescriptor.CheckoutType.AUTO
, throwsIllegalArgumentException
if passed.- Specified by:
getVcsRootsHash
in interfaceBuildTypeEx
-
releaseSources
public void releaseSources()
Description copied from interface:SBuildType
Releases sources of the build configuration on ALL agents where this configuration built. After that full checkout will be performed when build of this configuration starts on such agents.- Specified by:
releaseSources
in interfaceSBuildType
-
releaseSources
public void releaseSources(@NotNull SBuildAgent agent)
Description copied from interface:SBuildType
Releases sources of the build configuration on specified agent only. After that full checkout will be performed when build of this configuration starts on the specified agent.- Specified by:
releaseSources
in interfaceSBuildType
- Parameters:
agent
- agent
-
getAgentsWhereBuildConfigurationBuilt
@NotNull public List<SBuildAgent> getAgentsWhereBuildConfigurationBuilt()
Description copied from interface:SBuildType
Returns list of agents (sorted by name) where this build configuration was ever built.- Specified by:
getAgentsWhereBuildConfigurationBuilt
in interfaceSBuildType
- Returns:
- see above
-
getTags
public List<String> getTags()
Description copied from interface:SBuildType
List of all tags set for builds of this configuration.- Specified by:
getTags
in interfaceSBuildType
- Returns:
- union of tags for each build for the configuration.
-
getBuildDuration
public long getBuildDuration(@NotNull BuildAgent agent)
Description copied from interface:BuildConfigurationInfo
Returns estimated duration of a build on the specified agent.- Specified by:
getBuildDuration
in interfaceBuildConfigurationInfo
- Parameters:
agent
- build agent.- Returns:
- Estimated time in milliseconds. -1 if an estimate cannot be calculated for some reason (e.g. lack of statistics).
-
getLabelingType
@NotNull public VcsLabelingSettings.LabelingType getLabelingType()
- Specified by:
getLabelingType
in interfaceVcsLabelingSettings
- Returns:
- Returns labeling mode
-
getLabelPattern
@NotNull public String getLabelPattern()
- Specified by:
getLabelPattern
in interfaceVcsLabelingSettings
- Returns:
- Returns pattern to use for labeling
-
forceCheckingForChanges
public void forceCheckingForChanges()
Description copied from interface:SBuildType
Starts checking for changes for all VCS roots of this build configuration- Specified by:
forceCheckingForChanges
in interfaceSBuildType
-
forceCheckingForChanges
public void forceCheckingForChanges(@NotNull OperationRequestor requestor)
Description copied from interface:SBuildType
Starts checking for changes for all VCS roots of this build configuration- Specified by:
forceCheckingForChanges
in interfaceSBuildType
-
createBuildPromotion
@NotNull public BuildPromotionEx createBuildPromotion()
Description copied from interface:BuildTypeEx
Creates new build promotion which then can be used when build is added to a queue. Build promotion holds necessary information to reproduce a build. If build configuration has source dependencies on other build configurations, the whole graph is constructed and the top node of this graph (corresponding to this build configuration) is returned.- Specified by:
createBuildPromotion
in interfaceBuildTypeEx
- Returns:
- newly created build promotion.
-
createBuildPromotion
@NotNull public BuildPromotionEx createBuildPromotion(@NotNull String branchName)
Description copied from interface:BuildTypeEx
Creates build promotion graph and sets specified branch name to all its nodes.- Specified by:
createBuildPromotion
in interfaceBuildTypeEx
- Parameters:
branchName
- name of the branch- Returns:
- newly created build promotion.
-
createBuildPromotion
@NotNull public BuildPromotionEx createBuildPromotion(@Nullable String branchName, @Nullable BuildPromotionInitializer initializer)
Description copied from interface:BuildTypeEx
Same asBuildTypeEx.createBuildPromotion(String)
but accepts initializer which is called for every new build promotion in the created build chain- Specified by:
createBuildPromotion
in interfaceBuildTypeEx
- Returns:
-
createBuildPromotion
@NotNull public BuildPromotionEx createBuildPromotion(@Nullable String branchName, @Nullable BuildPromotionInitializer initializer, @Nullable DependenciesSupplier dependenciesSupplier)
Description copied from interface:BuildTypeEx
Same asBuildTypeEx.createBuildPromotion(String)
but accepts initializer and dependencies supplier. Initializer is called for every new build promotion in the created build chain, while dependencies supplier is used to fetch dependencies of the current node while the build chain is constructed.- Specified by:
createBuildPromotion
in interfaceBuildTypeEx
- Returns:
-
createBuildCustomizer
@NotNull public BuildCustomizer createBuildCustomizer(@Nullable SUser user)
Description copied from interface:BuildTypeEx
CreatesBuildCustomizer
that can be used to create custom promotions for this build type- Specified by:
createBuildCustomizer
in interfaceBuildTypeEx
-
createPersonalBuildType
@NotNull public RemoteBuildTypeEx createPersonalBuildType(@NotNull User user, @Nullable String comment)
Description copied from interface:BuildTypeEx
Creates personal build type, i.e. build type which is used to start personal builds.- Specified by:
createPersonalBuildType
in interfaceBuildTypeEx
- Parameters:
user
- personal build type ownercomment
- personal comment- Returns:
- new personal build type
-
createPersonalBuildType
@NotNull public RemoteBuildTypeEx createPersonalBuildType(@NotNull User user, long changeListId)
Description copied from interface:BuildTypeEx
Creates personal build type, i.e. build type which is used to start personal builds.- Specified by:
createPersonalBuildType
in interfaceBuildTypeEx
- Parameters:
user
- personal build type ownerchangeListId
- id of the personal change list (must be published separately)- Returns:
- new personal build type
-
createPersonalBuildType
@NotNull public RemoteBuildTypeEx createPersonalBuildType(@NotNull User user, @Nullable String comment, @NotNull Map<VcsRootInstance,VcsRootInstance> overridenRoots)
Description copied from interface:BuildTypeEx
Create personal build type that starts build with overriden roots. If there are snapshot dependencies, personal builds will be created for those nodes where overridden roots are applicable.- Specified by:
createPersonalBuildType
in interfaceBuildTypeEx
- Parameters:
user
- personal build type ownercomment
- personal commentoverridenRoots
- overriden roots map (original root -> substitution root)- Returns:
- new personal build type
-
getLabelingRoots
@NotNull public List<VcsRoot> getLabelingRoots()
Description copied from interface:VcsLabelingSettings
List of roots which should be processed by labeling process- Specified by:
getLabelingRoots
in interfaceVcsLabelingSettings
- Returns:
- list of up-to-date vcs roots
-
mapVcsPath
@Nullable public PathMapping mapVcsPath(@NotNull String path)
Description copied from interface:SBuildType
Returns path mapping for the given full VCS path of a file if this path can correspond to any of the project's VCS roots. (TODO serganch: describe the term "full VCS path" somewhere)- Specified by:
mapVcsPath
in interfaceSBuildType
- Specified by:
mapVcsPath
in interfaceVcsWorkspaceAccess
- Parameters:
path
- a full path to a file (not necessarily existing)- Returns:
- the path mapping object or null if no mapping exists
-
getExtendedName
@NotNull public String getExtendedName()
Description copied from interface:SBuildType
Returns the name of build configuration with additional note if the project is archived. Useful when archived build configurations should be shown together with non-archived.- Specified by:
getExtendedName
in interfaceSBuildType
- Returns:
- build configuration name
- See Also:
SProject.getExtendedName()
-
getExtendedFullName
@NotNull public String getExtendedFullName()
Description copied from interface:SBuildType
Returns the full name of build configuration with additional note if the project is archived. Useful when archived build configurations should be shown together with non-archived.- Specified by:
getExtendedFullName
in interfaceSBuildType
- Returns:
- build configuration name
- See Also:
SProject.getExtendedFullName()
-
getFileContent
@NotNull public byte[] getFileContent(@NotNull String relativePath) throws VcsException
Description copied from interface:SBuildType
Get binary content of the latest version of a file related to this build type.- Specified by:
getFileContent
in interfaceSBuildType
- Specified by:
getFileContent
in interfaceVcsWorkspaceAccess
- Parameters:
relativePath
- - relative file path regarding to the project root, "checkout root" from vcs root should not be included- Returns:
- - specified file content, corresponding to the build type
- Throws:
VcsException
- if some problem occurred while getting file content from the source control repository.
-
getFileContent
@NotNull public byte[] getFileContent(@NotNull String relativePath, boolean latest) throws VcsException
Description copied from interface:VcsWorkspaceAccess
Same as {@link #getFileContent(String, false)}- Specified by:
getFileContent
in interfaceVcsWorkspaceAccess
- Parameters:
relativePath
- relative file path regarding to the project root, "checkout root" from vcs root should not be includedlatest
- if false, then file content corresponds to the revision detected during the last checking for changes process, if true, then the file content for the current repository revision will be returned- Returns:
- binary content of the file
- Throws:
VcsException
- if some problem occurred while getting file content from the source control repository.
-
beforeParameterModification
protected void beforeParameterModification(@NotNull String paramName)
-
addConfigParameter
public void addConfigParameter(@NotNull Parameter param)
Description copied from interface:BuildTypeSettings
Adds configuration parameter. There are three different types of parameters which can be added to build configuration settings:- build parameters - these are parameters passed to agent and then to a build (see
BuildTypeSettings.addBuildParameter(Parameter)
), these parameters must have prefix system. or env. - runner parameters - these are parameters of a runner, they are transferred to agent and passed to corresponding build runner plugin
- configuration parameters - these parameters are not transferred to agent or build, but can be referenced in various places (including build & runner parameters and thus can effectively pass to a build)
- Specified by:
addConfigParameter
in interfaceBuildTypeSettings
- Parameters:
param
- configuration parameter
- build parameters - these are parameters passed to agent and then to a build (see
-
removeConfigParameter
public void removeConfigParameter(@NotNull String paramName)
Description copied from interface:BuildTypeSettings
Removes configuration parameters with specified name- Specified by:
removeConfigParameter
in interfaceBuildTypeSettings
- Parameters:
paramName
- parameter name
-
addParameter
public void addParameter(@NotNull Parameter param)
Description copied from interface:UserParametersHolder
Adds parameter.- Specified by:
addParameter
in interfaceUserParametersHolder
- Parameters:
param
- build or config parameter, the type is determined by parameter prefix
-
removeParameter
public void removeParameter(@NotNull String paramName)
Description copied from interface:UserParametersHolder
Removes parameter.- Specified by:
removeParameter
in interfaceUserParametersHolder
- Parameters:
paramName
- build or config parameter name, the type is determined by parameter prefix
-
getParametersCollection
@NotNull public Collection<Parameter> getParametersCollection()
Description copied from interface:ReadOnlyUserParameters
Returns build and configuration parameters in single collection.- Specified by:
getParametersCollection
in interfaceInheritableUserParametersHolder
- Specified by:
getParametersCollection
in interfaceReadOnlyUserParameters
- Returns:
- merged collection of parameters, i.e. all parameters inherited from parent holders and own parameters
-
getParameter
@Nullable public Parameter getParameter(@NotNull String paramName)
- Specified by:
getParameter
in interfaceReadOnlyUserParameters
-
getConfigParametersCollection
@NotNull public Collection<Parameter> getConfigParametersCollection()
Description copied from interface:BuildTypeSettings
Returns collection of configuration parameters.- Specified by:
getConfigParametersCollection
in interfaceBuildTypeSettings
- Returns:
- see above
-
getConfigParameters
@NotNull public Map<String,String> getConfigParameters()
Description copied from interface:BuildTypeSettings
Returns map of configuration parameters- Specified by:
getConfigParameters
in interfaceBuildTypeSettings
- Returns:
- see above
-
getUndefinedParameters
@NotNull public List<String> getUndefinedParameters()
Description copied from interface:BuildTypeSettings
Returns collection of parameter names (config and build params) referenced in the build configuration settings but without values provided. I.e. there is a reference to a parameter but such parameter is not defined anywhere.
Parameter value can come from different sources:- build configuration or template settings
- agents
- various extensions
- Specified by:
getUndefinedParameters
in interfaceBuildTypeSettings
- Returns:
- see above
-
isTemplateBased
public boolean isTemplateBased()
Description copied from interface:BuildTypeSettings
Returns true if these settings are directly based on a template. It does not take into account a default template.- Specified by:
isTemplateBased
in interfaceBuildTypeSettings
- Returns:
- see above
-
getTemplate
@Deprecated public BuildTypeTemplateEx getTemplate()
Deprecated.Description copied from interface:BuildTypeSettings
Returns the first template these settings are based on.- Specified by:
getTemplate
in interfaceBuildTypeSettings
- Returns:
- see above
-
getTemplates
@NotNull public List<BuildTypeTemplateEx> getTemplates()
Description copied from interface:BuildTypeSettings
Returns templates these settings are based on, including the default template.- Specified by:
getTemplates
in interfaceBuildTypeSettings
- Returns:
- see above
-
getTemplateIds
@NotNull public List<String> getTemplateIds()
Description copied from interface:BuildTypeSettings
Returns internal ids of the templates this settings are based on, including one of the default template- Specified by:
getTemplateIds
in interfaceBuildTypeSettings
- Returns:
- see above
-
getTemplateId
@Deprecated public String getTemplateId()
Deprecated.Description copied from interface:BuildTypeSettings
Returns internal id of the first template this setting is based on- Specified by:
getTemplateId
in interfaceBuildTypeSettings
- Returns:
- see above
-
attachToTemplate
public void attachToTemplate(@NotNull BuildTypeTemplate template, boolean changeScopeOfLocalRoots) throws InvalidVcsRootScopeException
Description copied from interface:SBuildType
Attaches this build configuration to the specified template- Specified by:
attachToTemplate
in interfaceSBuildType
- Parameters:
template
- templatechangeScopeOfLocalRoots
- if true then local non accessible VCS roots will be shared (not used since 8.0)- Throws:
InvalidVcsRootScopeException
- if at least one of VCS roots from provided template is inaccessible in this build configuration and changeScopeOfLocalRoots == false
-
addTemplate
public void addTemplate(@NotNull BuildTypeTemplate template, boolean optimizeSettings)
Description copied from interface:SBuildType
Attach one more build configuration to a template. All previous templates will not be detached. If other templates are present in the build configuration, the newly attached templates will have the lowest priority, except for the default template (if configured in a corresponding project).- Specified by:
addTemplate
in interfaceSBuildType
- Parameters:
template
- see aboveoptimizeSettings
- If true, the build configuration's owner settings will be optimised by eliminating duplication
-
setTemplates
public void setTemplates(@NotNull List<? extends BuildTypeTemplate> templates, boolean optimizeSettings)
Description copied from interface:SBuildType
Replaces templates the build configuration is attached to. No settings copying occurs for templates to which the configuration ceased to be attached to as a result.- Specified by:
setTemplates
in interfaceSBuildType
- Parameters:
templates
- Ordered list of templates, the earlier a template in the list, the higher priority its settings haveoptimizeSettings
- If true, the build configuration's owner settings will be optimised by eliminating duplication with the effective settings coming from the templates.
-
setSettings
public void setSettings(@NotNull BuildTypeSettingsEx newSettings)
Description copied from interface:BuildTypeEx
Complete replacement of settings- Specified by:
setSettings
in interfaceBuildTypeEx
- Parameters:
newSettings
- new settings
-
attachToTemplate
public void attachToTemplate(@NotNull BuildTypeTemplate template) throws CannotAttachToTemplateException
Description copied from interface:SBuildType
Attaches this build configuration to the specified template. If the configuration is already template based, it will be detached from that template without copying of settings from it prior to being attached to the new template.- Specified by:
attachToTemplate
in interfaceSBuildType
- Parameters:
template
- template- Throws:
CannotAttachToTemplateException
- if template is not accessible from this build configuration
-
removeTemplates
public void removeTemplates(@NotNull Collection<? extends BuildTypeTemplate> templates, boolean inlineSettings)
Description copied from interface:SBuildType
Detaches build configuration from a number of templates.- Specified by:
removeTemplates
in interfaceSBuildType
- Parameters:
templates
- a collection of templates, the configuration must be attached to these (and possible some other) templatesinlineSettings
- if true, the effective settings coming from these templates are copied to the build configuration
-
detachFromTemplate
public void detachFromTemplate()
Description copied from interface:SBuildType
Detaches build configuration from all templates, except for the default one if present. Effective template settings are copied to the build configuration itself.- Specified by:
detachFromTemplate
in interfaceSBuildType
-
setTemplatesOrder
public void setTemplatesOrder(List<String> templateIds)
Description copied from interface:SBuildType
Imposes new order on the templates the build configuration is attached to.- Specified by:
setTemplatesOrder
in interfaceSBuildType
- Parameters:
templateIds
- the existing template ids in the new order. The list must match currently associated templates, excluding the default template.
-
getOwnTemplates
public List<BuildTypeTemplateEx> getOwnTemplates()
Description copied from interface:SBuildType
Returns a list of templates to which the build configuration is directly attached. That does not include default template.- Specified by:
getOwnTemplates
in interfaceSBuildType
- Returns:
- see above
-
inline
@NotNull public BuildTypeEx inline()
Description copied from interface:BuildTypeEx
Creates a temporary copy of this buildType with all settings inherited from a project or a template inlined.- Specified by:
inline
in interfaceBuildTypeEx
-
unregister
public void unregister()
Description copied from interface:BuildTypeIdentityEx
Removes this object from project model. No changes on disk are performed.- Specified by:
unregister
in interfaceBuildTypeEx
- Specified by:
unregister
in interfaceBuildTypeIdentityEx
- Specified by:
unregister
in classBaseBuildTypeIdentity
-
isTemplate
protected boolean isTemplate()
- Specified by:
isTemplate
in classBaseBuildTypeIdentity
-
logRemovingToAudit
protected void logRemovingToAudit(@NotNull ConfigAction cause)
- Specified by:
logRemovingToAudit
in classBaseBuildTypeIdentity
-
isTemplateAccessible
public boolean isTemplateAccessible()
Description copied from interface:BuildTypeSettings
Checks accessibility of all attached templates, excluding the default template (if present)- Specified by:
isTemplateAccessible
in interfaceBuildTypeSettings
- Returns:
- true if there are such templates and all of them are accessible to currently logged in user, false otherwise
-
replaceInValues
public boolean replaceInValues(@NotNull Pattern regexpPattern, @NotNull String replacement)
Description copied from interface:BuildTypeSettings
Replaces values according to specified pattern and replacement string in all text parameters of the build configuration- Specified by:
replaceInValues
in interfaceBuildTypeSettings
- Parameters:
regexpPattern
- regexp patternreplacement
- replacement- Returns:
- true if at least one text value was affected and false otherwise
-
textValueMatches
public boolean textValueMatches(@NotNull Pattern regexpPattern)
Description copied from interface:BuildTypeSettings
Returns true if configuration has value in text parameters which matches specified pattern. Only own parameters are checked - without inherited- Specified by:
textValueMatches
in interfaceBuildTypeSettings
- Parameters:
regexpPattern
- regexp pattern- Returns:
- true if such value exists and false otherwise
-
replaceInValues
public boolean replaceInValues(@NotNull String regexp, @NotNull String replacement)
Description copied from interface:BuildTypeSettings
Replaces values according to specified regexp and replacement string in all text parameters of the build configuration- Specified by:
replaceInValues
in interfaceBuildTypeSettings
- Parameters:
regexp
- regexpreplacement
- replacement- Returns:
- true if at least one text value was affected and false otherwise
-
addBuildFeature
@NotNull public SBuildFeatureDescriptor addBuildFeature(@NotNull String type, @NotNull Map<String,String> params)
Description copied from interface:BuildTypeSettings
Adds build feature with specified type and parameters to this settings object.- Specified by:
addBuildFeature
in interfaceBuildTypeSettings
- Parameters:
type
- build feature typeparams
- build feature parameters- Returns:
- build feature descriptor
-
addBuildFeature
public void addBuildFeature(@NotNull SBuildFeatureDescriptor feature)
Description copied from interface:BuildTypeSettings
Adds build feature descriptor to this settings object.- Specified by:
addBuildFeature
in interfaceBuildTypeSettings
- Parameters:
feature
- build feature descriptor
-
getBuildFeatures
@NotNull public Collection<SBuildFeatureDescriptor> getBuildFeatures()
Description copied from interface:BuildTypeSettings
Returns build features added to this settings object.- Specified by:
getBuildFeatures
in interfaceBuildTypeSettings
- Returns:
- collection of configured build features
-
getBuildFeaturesOfType
@NotNull public Collection<SBuildFeatureDescriptor> getBuildFeaturesOfType(@NotNull String type)
Description copied from interface:BuildTypeSettings
Returns all build features of specified type.- Specified by:
getBuildFeaturesOfType
in interfaceBuildTypeSettings
- Returns:
- see above
-
removeBuildFeature
public SBuildFeatureDescriptor removeBuildFeature(@NotNull String featureId)
Description copied from interface:BuildTypeSettings
Removes build feature with specified id from this settings object.- Specified by:
removeBuildFeature
in interfaceBuildTypeSettings
- Parameters:
featureId
- id of the feature- Returns:
- removed build feature descriptor or null if there were no feature descriptor with such id
-
updateBuildFeature
public boolean updateBuildFeature(@NotNull String featureId, @NotNull String newType, @NotNull Map<String,String> newParams)
Description copied from interface:BuildTypeSettings
Updates build feature descriptor with specified id, changes type and parameters.- Specified by:
updateBuildFeature
in interfaceBuildTypeSettings
- Parameters:
featureId
- id of build feature descriptornewType
- type of build feature descriptornewParams
- parameters map- Returns:
- true if parameters of build feature descriptor were changed (descriptor with such id exists) and false otherwise
-
findBuildFeatureById
@Nullable public SBuildFeatureDescriptor findBuildFeatureById(@NotNull String featureId)
Description copied from interface:BuildTypeSettings
Returns build feature with specified id- Specified by:
findBuildFeatureById
in interfaceBuildTypeSettings
- Parameters:
featureId
- id of the feature- Returns:
- see above
-
setEnabled
public void setEnabled(@NotNull String id, boolean enabled)
Description copied from interface:BuildTypeSettings
Enables or disables descriptor with specified id in build configuration settings. This method can be used to enable or disable build runners, triggers and build features.- Specified by:
setEnabled
in interfaceBuildTypeSettings
- Parameters:
id
- id of build runner, trigger or build featureenabled
- true to enable, false to disable
-
isEnabled
public boolean isEnabled(@NotNull String id)
Description copied from interface:BuildTypeSettings
Returns true if descriptor with specified id (runner, trigger or build feature) is enabled and false otherwise.- Specified by:
isEnabled
in interfaceBuildTypeSettings
- Parameters:
id
- id of build runner, trigger or build feature
-
removeAllBuildRunners
public void removeAllBuildRunners()
Description copied from interface:BuildTypeEx
Removes all build runners- Specified by:
removeAllBuildRunners
in interfaceBuildTypeEx
- Specified by:
removeAllBuildRunners
in interfaceBuildTypeSettings
-
getLastConfigModificationAction
@Nullable public AuditLogAction getLastConfigModificationAction()
- Specified by:
getLastConfigModificationAction
in interfaceBuildTypeEx
-
getVcsRootInstanceForParent
@Nullable public VcsRootInstance getVcsRootInstanceForParent(@NotNull SVcsRoot parentRoot)
- Specified by:
getVcsRootInstanceForParent
in interfaceSBuildType
- Returns:
- VCS root instance for specified parentRoot. Parent VCS root must be attached to this configuration, otherwise null will be returned.
-
getVcsRootInstanceEntryForParent
@Nullable public VcsRootInstanceEntry getVcsRootInstanceEntryForParent(@NotNull SVcsRoot parentRoot)
- Specified by:
getVcsRootInstanceEntryForParent
in interfaceSBuildType
- Returns:
- VCS root instance entry for specified parentRoot. Parent VCS root must be attached to this configuration, otherwise null will be returned.
-
getVcsRootInstanceEntries
@NotNull public List<VcsRootInstanceEntry> getVcsRootInstanceEntries()
- Specified by:
getVcsRootInstanceEntries
in interfaceSBuildType
- Returns:
- resolved VCS root entries (entries with resolved settings: VCS root parameters and checkout rules).
-
getVcsRootInstanceEntries
@NotNull public List<VcsRootInstanceEntry> getVcsRootInstanceEntries(boolean includeSettingsRoot)
Description copied from interface:BuildTypeEx
Returns entries for VCS roots attached to this buildType. If buildType has an implicit settings root (not attached to buildType) andincludeSettingsRoot
istrue
, then an entry for this settings root is included in the result.- Specified by:
getVcsRootInstanceEntries
in interfaceBuildTypeEx
- Parameters:
includeSettingsRoot
- whether settings root should be included in result- Returns:
- see above
-
isImplicitSettingsRoot
public boolean isImplicitSettingsRoot(@NotNull VcsRootInstance root)
Description copied from interface:BuildTypeEx
Returns true if the specified VCS root is an implicit settings root, ie. this buildType's project stores settings in this root and root is not attached to this buildType- Specified by:
isImplicitSettingsRoot
in interfaceBuildTypeEx
- Parameters:
root
- root of interest- Returns:
- see above
-
isInsideVcsRootsResolving
public static boolean isInsideVcsRootsResolving()
-
getVcsRootInstanceEntries
@NotNull public List<VcsRootInstanceEntry> getVcsRootInstanceEntries(@NotNull Set<String> vcsNames, boolean includeSettingsRoot)
Description copied from interface:SBuildType
Returns entries corresponding to specified vcs support names- Specified by:
getVcsRootInstanceEntries
in interfaceSBuildType
- Parameters:
vcsNames
- VCS support namesincludeSettingsRoot
- whether settings root should be included in result- Returns:
- see above
-
createEditableCopy
@NotNull public BuildTypeEx createEditableCopy(boolean fillSettings)
- Specified by:
createEditableCopy
in interfaceBuildTypeEx
-
getVcsRootInstances
@NotNull public List<VcsRootInstance> getVcsRootInstances()
- Specified by:
getVcsRootInstances
in interfaceSBuildType
- Returns:
- collection of VCS root instances used in this build configuration.
-
getRunnersOrder
@Nullable public String[] getRunnersOrder()
- Specified by:
getRunnersOrder
in interfaceBuildTypeSettings
- Returns:
- runner ids in their custom order (if such order is set), null otherwise
-
applyRunnersOrder
public void applyRunnersOrder(@NotNull String[] ids)
Description copied from interface:BuildTypeSettings
Accepts array of runner identifiers and reorders them according to this array.- Specified by:
applyRunnersOrder
in interfaceBuildTypeSettings
- Parameters:
ids
- runner identifiers
-
resetRunnersOrder
public void resetRunnersOrder()
Description copied from interface:BuildTypeSettings
Resets custom runner order to default.- Specified by:
resetRunnersOrder
in interfaceBuildTypeSettings
-
getBuildSettings
@NotNull public BuildSettings getBuildSettings()
Description copied from interface:BuildTypeEx
Returns build settings: settings for build (where excluded disabled options and features).- Specified by:
getBuildSettings
in interfaceBuildTypeEx
- Returns:
- build settings.
-
createExternalIdChangedConfigAction
@NotNull protected ConfigAction createExternalIdChangedConfigAction()
- Specified by:
createExternalIdChangedConfigAction
in classBaseBuildTypeIdentity
-
sendExtIdChangedEvents
public void sendExtIdChangedEvents(@NotNull ConfigAction cause, @NotNull String oldExternalId, @NotNull String newExternalId)
Description copied from class:BaseBuildTypeIdentity
The method is called when the external identifier has been changed.- Specified by:
sendExtIdChangedEvents
in interfaceBuildTypeIdentityEx
- Specified by:
sendExtIdChangedEvents
in classBaseBuildTypeIdentity
oldExternalId
- the old external identifier value.newExternalId
- the new external identifier value.
-
auditExternalIdChanged
protected void auditExternalIdChanged(@NotNull ConfigAction cause, @NotNull String oldExternalId, @NotNull String newExternalId)
- Specified by:
auditExternalIdChanged
in classBaseBuildTypeIdentity
-
listFiles
@NotNull public List<VcsFile> listFiles(@NotNull String relativePath) throws VcsException
Description copied from interface:VcsWorkspaceAccess
Lists files in the directory specified by relativePath- Specified by:
listFiles
in interfaceVcsWorkspaceAccess
- Parameters:
relativePath
- relative path regarding to the project root, "checkout root" from vcs root should not be included- Returns:
- list of files in directory
- Throws:
VcsException
- if some problem occurred while listing files or when files cannot be listed (canListFiles() returns false)
-
getVcsFilesBrowser
@NotNull public Browser getVcsFilesBrowser()
- Specified by:
getVcsFilesBrowser
in interfaceVcsWorkspaceAccess
- Returns:
- tree browser that shouws all contents VCS
-
getVcsFoldersBrowser
@NotNull public Browser getVcsFoldersBrowser()
- Specified by:
getVcsFoldersBrowser
in interfaceVcsWorkspaceAccess
- Returns:
- tree browser that shouws only directories in VCS
-
canListFiles
public boolean canListFiles()
- Specified by:
canListFiles
in interfaceVcsWorkspaceAccess
- Returns:
- true if list files is possible, false otherwise
-
getOwnVcsRootEntries
@NotNull public List<VcsRootEntry> getOwnVcsRootEntries()
- Specified by:
getOwnVcsRootEntries
in interfaceSBuildType
- Returns:
- build configuration own VCS roots, i.e. it does not contain VCS roots inherited from template
-
getTags
@NotNull public List<String> getTags(@NotNull SUser user)
Description copied from interface:BuildTypeEx
List of all private tags set for builds of this configuration by the specified user.- Specified by:
getTags
in interfaceBuildTypeEx
- Returns:
- union of tags for each build for the configuration.
-
getArtifactDirectories
@NotNull public List<File> getArtifactDirectories()
- Specified by:
getArtifactDirectories
in interfaceBuildTypeEx
- Returns:
- list of directories where artifacts of builds of this build type are stored. List always has at least one element. The first directory in the list is a directory where new builds store their artifacts.
-
getDeclaredOption
public <T> T getDeclaredOption(@NotNull Option<T> option)
Description copied from interface:BuildTypeEx
Get option value declared in this BuildTypeSettings
- Specified by:
getDeclaredOption
in interfaceBuildTypeEx
- Specified by:
getDeclaredOption
in interfaceOptionSupport
- Parameters:
option
- option to retrieve value for- Returns:
- value of the option. If value wasn't set, null is returned
-
getOwnParameter
public Parameter getOwnParameter(@NotNull String paramName)
- Specified by:
getOwnParameter
in interfaceInheritableUserParametersHolder
- Parameters:
paramName
- parameter name- Returns:
- own parameter with given name or null if there is no such parameter
-
getOwnParametersWithoutInheritedSpec
@NotNull public Collection<Parameter> getOwnParametersWithoutInheritedSpec()
- Specified by:
getOwnParametersWithoutInheritedSpec
in interfaceInheritableUserParametersHolder
- Returns:
- own parameters as is, with own parameters spec.
-
getInheritedParametersCollection
@NotNull public Collection<Parameter> getInheritedParametersCollection()
- Specified by:
getInheritedParametersCollection
in interfaceInheritableUserParametersHolder
- Returns:
- collection of inherited parameters.
-
getOwnNonInheritedParameter
@Nullable public Parameter getOwnNonInheritedParameter(@NotNull String paramName)
Description copied from interface:InheritableUserParametersHolderEx
Own parameter without inherited parameter spec.- Specified by:
getOwnNonInheritedParameter
in interfaceInheritableUserParametersHolderEx
- Returns:
-
getExcludedDefaultRootInstanceIds
@NotNull public Set<Long> getExcludedDefaultRootInstanceIds()
Description copied from interface:BuildTypeEx
Returns set of vcs root instance ids with excluded default branch- Specified by:
getExcludedDefaultRootInstanceIds
in interfaceBuildTypeEx
- Returns:
- see above
-
isDeployment
public boolean isDeployment()
- Specified by:
isDeployment
in interfaceBuildTypeSettings
- Returns:
- true if this build configuration is doing deployment
-
getRunBuildActionName
public String getRunBuildActionName()
- Specified by:
getRunBuildActionName
in interfaceBuildTypeEx
- Returns:
- name of the Run build action in this configuration, this could be Run, Deploy, Upload, etc. The primary usage of this name is web interface.
-
isCompositeBuildType
public boolean isCompositeBuildType()
- Specified by:
isCompositeBuildType
in interfaceBuildTypeEx
- Specified by:
isCompositeBuildType
in interfaceBuildTypeSettings
- Returns:
- true if this build type is composite
-
isAgentLessBuildType
public boolean isAgentLessBuildType()
- Specified by:
isAgentLessBuildType
in interfaceBuildTypeEx
- Returns:
- true if this build type is agent less
-
isDefaultBranchExcluded
public boolean isDefaultBranchExcluded()
Description copied from interface:BuildTypeEx
Returns true default branch is excluded in the build configuration branch filter- Specified by:
isDefaultBranchExcluded
in interfaceBuildTypeEx
- Returns:
- see above
-
getBuildTypeBranchFilter
@NotNull public BranchFilter getBuildTypeBranchFilter()
- Specified by:
getBuildTypeBranchFilter
in interfaceSBuildType
- Returns:
- default branch filter which is applied to all branches available in this configuration since 2019.1
-
getBuildTypeBranchFilterUnsafe
@NotNull public BranchFilter getBuildTypeBranchFilterUnsafe() throws InvalidBranchSpecException
Description copied from interface:BuildTypeEx
Same asSBuildType.getBuildTypeBranchFilter()
but throws an exception if the branch filter is incorrect- Specified by:
getBuildTypeBranchFilterUnsafe
in interfaceBuildTypeEx
- Throws:
InvalidBranchSpecException
-
getRelatedVcsRootInstanceIds
@NotNull public Set<Long> getRelatedVcsRootInstanceIds()
Description copied from interface:BuildTypeEx
Returns ids of VCS root instances which reported changes associated with this build configuration.- Specified by:
getRelatedVcsRootInstanceIds
in interfaceBuildTypeEx
- Returns:
-
isVirtual
public boolean isVirtual()
- Specified by:
isVirtual
in interfaceSBuildType
- Specified by:
isVirtual
in interfaceSPersistentEntity
- Returns:
- true if this entity is auto-generated and can be regenerated or removed by the server at any point of time,
see also
SProject.isVirtual()
-
isEmptyUuid
public boolean isEmptyUuid()
- Specified by:
isEmptyUuid
in interfaceBuildTypeEx
- Returns:
- true if this buildType has an empty uuid in its config on disk
-
reassignIntId
public void reassignIntId(@NotNull String internalId)
Description copied from interface:BuildTypeEx
Assigns the specified internalId to this buildType. The internalId should come from an entityId present in DB and marked as removed, otherwise anIllegalArgumentException
is thrown.- Specified by:
reassignIntId
in interfaceBuildTypeEx
-
-