Class BuildFeature

  • All Implemented Interfaces:
    ServerExtension, TeamCityExtension

    public abstract class BuildFeature
    extends java.lang.Object
    implements ServerExtension
    Represents a kind of a plugin that provides some functionality around a build. Usually such plugin has corresponding agent-side part.
    Since:
    6.0
    • Constructor Detail

      • BuildFeature

        public BuildFeature()
    • Method Detail

      • getType

        @NotNull
        public abstract java.lang.String getType()
        Type of the feature, must be unique among all of the features.
        Returns:
        type of the feature
      • getDisplayName

        @NotNull
        public abstract java.lang.String getDisplayName()
        User presentable name of the feature.
        Returns:
        name of the feature to show in the user interface.
      • describeParameters

        @NotNull
        public java.lang.String describeParameters​(@NotNull
                                                   java.util.Map<java.lang.String,​java.lang.String> params)
        Returns parameters description of the build feature, will be used in the TeamCity UI to describe this feature settings.
        Parameters:
        params - parameters to describe
        Returns:
        short description of parameters.
      • getParametersProcessor

        @Nullable
        public PropertiesProcessor getParametersProcessor()
        Returns parameters processor which will be used to validate and alter parameters specified by user.
        Returns:
        see above
      • getEditParametersUrl

        @Nullable
        public abstract java.lang.String getEditParametersUrl()
        Returns:
        absolute path to a JSP file or controller for editing parameters, should not include context path.
      • getDefaultParameters

        @Nullable
        public java.util.Map<java.lang.String,​java.lang.String> getDefaultParameters()
        Returns:
        default parameters
      • isMultipleFeaturesPerBuildTypeAllowed

        public boolean isMultipleFeaturesPerBuildTypeAllowed()
        Returns true if single build type can contain more than one build feature of this type.
        Returns:
        see above
      • isRequiresAgent

        public boolean isRequiresAgent()
        Returns:
        true if this build feature has some code which should be executed on the agent during the build. If false is returned then parameters of this feature will not be passed to an agent.
        Since:
        2017.2
      • getRequirements

        @NotNull
        public java.util.Collection<Requirement> getRequirements​(java.util.Map<java.lang.String,​java.lang.String> params)
        Returns agent requirements imposed by this build feature on build agents which can run builds when this feature is enabled
        Parameters:
        params - parameters of the build feature
        Returns:
        see above
        Since:
        2019.1
      • isUnchangedBySettingsFreeze

        public boolean isUnchangedBySettingsFreeze()
        Returns:
        true if the build feature is supposed to stay unchanged by settings freeze. This is important for build features that may affect a build before the settings freeze happens for that build. If any change in such a build feature is taken from VCS after the build is triggered, this change will not affect that build.
        Since:
        2020.1