Interface InternalParameters

    • Method Detail

      • getInternalParameterValue

        @NotNull
        default String getInternalParameterValue​(@NotNull
                                                 String paramName,
                                                 @NotNull
                                                 String defaultVal)
        Besides usual parameters, TeamCity also supports so called internal parameters. These parameters are often used as feature toggles. All parameters starting with teamcity.internal. prefix are treated as internal parameters. It is not possible to have a reference to such a parameter from another parameter, like %teamcity.internal.param%. In addition, these parameters do not affect reuse of the builds, so two builds with and without internal parameter are considered equivalent. This method works as follows: - if paramName starts with "teamcity." prefix then configuration parameters and then internal properties are searched for presence of this parameter - if paramName does not start with "teamcity." prefix, then method searches for parameters with prefixes and in the order: teamcity.internal. and teamcity. - if nothing found, then defaultVal is returned
        Parameters:
        paramName - name of the parameter with or without teamcity./teamcity.internal. prefixes
        defaultVal - default value to return if nothing found
        Returns:
        parameter value or default
        Since:
        2019.1.2
      • getBooleanInternalParameter

        default boolean getBooleanInternalParameter​(@NotNull
                                                    String paramName)
        Same as {getInternalParameterValue(String, String) but treats parameter value as boolean with false returned as default value
        Parameters:
        paramName - parameter name
        Returns:
        see above
        Since:
        2019.1.2
      • getBooleanInternalParameterOrTrue

        default boolean getBooleanInternalParameterOrTrue​(@NotNull
                                                          String paramName)
        Same as {getInternalParameterValue(String, String) but treats parameter value as boolean with true returned as default value
        Parameters:
        paramName - parameter name
        Returns:
        see above
        Since:
        2019.1.2