Class SystemProperty


  • public class SystemProperty
    extends AbstractSystemProperty
    This class represents system properties as constants. The system / environmental constants resolution order goes:
    1. System.getProperty (so any -Dproperty=hello will take precedent)
    2. System.getenv()
    3. Ant's Execute.getProcEnvironment()
    • Field Detail

      • BAMBOO_AGENT_BROKER_URL_PROPERTY_NAME

        public static final String BAMBOO_AGENT_BROKER_URL_PROPERTY_NAME
        See Also:
        Constant Field Values
      • PER_NODE_QUEUE_STATS_LOGGING_INTERVAL_MINUTES_DEFAULT

        public static final long PER_NODE_QUEUE_STATS_LOGGING_INTERVAL_MINUTES_DEFAULT
        See Also:
        Constant Field Values
      • BAMBOO_HOME_FROM_ENV

        public static final SystemProperty BAMBOO_HOME_FROM_ENV
        Location of Bamboo Home. If running in HA mode, this refers to the local home.

        • Default : none
        • Usage:
          • env : BAMBOO_HOME=bamboo-home or bamboo.home=bamboo-home
          • java: -DBAMBOO_HOME=bamboo-home, -Dbamboo.home=bamboo-home
      • BAMBOO_HOME_SHARED_FROM_ENV

        public static final SystemProperty BAMBOO_HOME_SHARED_FROM_ENV
        Location of Bamboo Shared Home. Default is /shared subdirectory of bamboo.home.

        • Default : none
        • Usage:
          • env : BAMBOO_SHARED_HOME=bamboo-shared-home or bamboo.shared.home=bamboo-shared-home
          • java: -DBAMBOO_SHARED_HOME=bamboo-shared-home, -Dbamboo.shared.home=bamboo-shared-home
      • MAVEN_HOME

        public static final SystemProperty MAVEN_HOME
        Location of MAVEN 1

        • Default : none
        • Usage:
          • env : MAVEN_HOME=maven1-install
          • java: -DMAVEN_HOME=maven1-install
      • MAVEN2_HOME

        public static final SystemProperty MAVEN2_HOME
        Location of MAVEN 2

        • Default : none
        • Usage:
          • env : M2_HOME=maven2-install, MAVEN2_HOME=maven2-install
          • java: -DM2_HOME=maven2-install, -DMAVEN2_HOME=maven2-install
      • ANT_HOME

        public static final SystemProperty ANT_HOME
        Location of ANT

        • Default : none
        • Usage:
          • env : ANT_HOME=ant-install
          • java: -DANT_HOME=ant-install
      • DEFAULT_PERFORCE_PORT

        public static final SystemProperty DEFAULT_PERFORCE_PORT
        Default Perforce Port (Perforce server!)

        • Default : none
        • Usage:
          • env : P4PORT=p4host:port
          • java: -DP4PORT=p4host:port
      • DEFAULT_PERFORCE_CLIENT

        public static final SystemProperty DEFAULT_PERFORCE_CLIENT
        Default Perforce Client

        • Default : none
        • Usage:
          • env : P4CLIENT=p4clientname
          • java: -DP4CLIENT=p4clientname
      • DEFAULT_PERFORCE_USER

        public static final SystemProperty DEFAULT_PERFORCE_USER
        Default Perforce User

        • Default :
        • Usage:
          • env : P4USER=p4username
          • java: -DP4USER=p4username
      • DEFAULT_P4_EXE

        public static final SystemProperty DEFAULT_P4_EXE
        Default Perforce p4 executable

        • Default : none
        • Usage:
          • env : P4EXE=/path/to/p4exec
          • java: -DP4EXE=/path/to/p4exec
      • FIND_SUCCESS_MESSAGE_IN_LAST

        public static final SystemProperty FIND_SUCCESS_MESSAGE_IN_LAST
        Number of lines for builders to look back to guarantee build successful.

        • Default : 250
        • Usage:
          • env : SUCCESS_MESSAGE_LINES=number
          • java: -DSUCCESS_MESSAGE_LINES=number
      • BUILD_SUCCESSFUL_MARKER

        public static final SystemProperty BUILD_SUCCESSFUL_MARKER
        Text the builders will look for when checking for build success.

        • Default : BUILD SUCCESS
        • Usage:
          • env : atlassian.bamboo.builder.successMarker="String"
          • java: -atlassian.bamboo.builder.successMarker="String"
      • BUILD_FAILED_MARKER

        public static final SystemProperty BUILD_FAILED_MARKER
        Text the builders will look for when checking for build failure, currently only used by ant builder

        • Default : BUILD FAILED
        • Usage:
          • env : atlassian.bamboo.builder.failedMarker="String"
          • java: -Datlassian.bamboo.builder.failedMarker="String"
      • SEARCH_BUILD_SUCCESS_FAIL_MESSAGE_EVERYWHERE

        public static final SystemProperty SEARCH_BUILD_SUCCESS_FAIL_MESSAGE_EVERYWHERE
        A workaround for BAM-4069, allows us to search for build successful/failed messages.

        • Default : false
        • Usage:
          • env : bamboo.build.searchSuccessFailMessageEverywhere="true"
          • java: -Dbamboo.build.searchSuccessFailMessageEverywhere=true
      • DISABLE_AGENT_AUTO_CAPABILITY_DETECTION

        public static final SystemProperty.BooleanSystemProperty DISABLE_AGENT_AUTO_CAPABILITY_DETECTION
        Prevents agents from automatically overriding auto-detected remote agent capabilities on new startup

        • Default : false
        • Usage:
          • env : DISABLE_AGENT_AUTO_CAPABILITY_DETECTION="true"
          • java: -DDISABLE_AGENT_AUTO_CAPABILITY_DETECTION=true
      • DISABLE_AGENT_CAPABILITY_UPDATE

        public static final SystemProperty.BooleanSystemProperty DISABLE_AGENT_CAPABILITY_UPDATE
        Prevents agents from overriding remote agent capabilities from bamboo-capabilities.properties on startup

        • Default : false
        • Usage:
          • env : bamboo.disable.capabilities.properties.file="true"
          • java: -Dbamboo.disable.capabilities.properties.file=true
      • REMOTE_AGENT_AUTHENTICATION_ENABLED

        public static final SystemProperty.BooleanSystemProperty REMOTE_AGENT_AUTHENTICATION_ENABLED
        Disables remote agent authentication on instance setup

        • Default : true
        • Usage:
          • env : bamboo.setup.remote.agent.authentication.enabled="false"
          • java: -Dbamboo.setup.remote.agent.authentication.enabled=false
      • REMOTE_AGENT_SECURITY_TOKEN_ENABLED

        public static final SystemProperty.BooleanSystemProperty REMOTE_AGENT_SECURITY_TOKEN_ENABLED
        Enables agent security token verification on instance setup

        • Default : false
        • Usage:
          • env : bamboo.setup.remote.agent.security.token.enabled="true"
          • java: -Dbamboo.setup.remote.agent.security.token.enabled=true
      • REMOTE_AGENT_SECURITY_TOKEN_VALUE

        public static final SystemProperty REMOTE_AGENT_SECURITY_TOKEN_VALUE
        Sets token value for Agent authentication (if defined bamboo won't generate new token). Token should contain only hexadecimal characters and have 40 characters length.
      • Usage:
        • env : bamboo.setup.remote.agent.security.token.value="ABCDEF12345678901234abcdef0123456789abcd"
        • java: -Dbamboo.setup.remote.agent.security.token.value=ABCDEF12345678901234abcdef0123456789abcd
  • Constructor Detail

    • SystemProperty

      public SystemProperty​(boolean mandatory,
                            String... properties)
      Creates an instance containing the value of the given property - logs an error if it cannot be found
      Parameters:
      mandatory - Is the property mandatory or optional?
      properties - The property we're loading from the environment (first name found will be loaded)
    • SystemProperty

      protected SystemProperty​(String property,
                               boolean mandatory,
                               org.apache.log4j.Logger log)
      Used in testing
      Parameters:
      property - The property we're loading from the environment
      mandatory - Is the property mandatory or optional?
      log - The logger we're logging errors to