System variables reference

System-defined variables are available to use in variables.

The system automatically sets values for the following variables in each step of a job. These variables are read-only. Their values for the job are listed in the ENV lines of the step log. The first four are project-level notifications. All other BF_ variables are used at step-level.

Project-Level Variable Value
BF_D Date. Can be used in tags. Format is determined by the Tag: Date Format system setting.
BF_J Day of the year. Can be used in tags.
BF_T Time. Can be used in tags. Format is determined by the Tag: Time Format system setting.
BF_W Day of the week, represented by a number from 0 (Sunday) to 6 (Saturday).
Step-Level Variable Value
BF_D Date. Can be used in tags. Format is determined by the Tag: Date Format system setting.
BF_J Day of the year. Can be used in tags.
BF_T Time. Can be used in tags. Format is determined by the Tag: Time Format system setting.
BF_W Day of the week, represented by a number from 0 (Sunday) to 6 (Saturday).
BF_AGENT_PLATFORM String identifying the operating system platform that the agent is running on.
BF_AGENT_VERSION Version number of the agent for the current server.
B Default tag variable, which starts at 1 and gets incremented for every job. Can be used in tags, which are represented by BF_TAG.
BF_BID Job ID number, unique for jobs of the same project.
BF_CALLER_ Prefix applied to variables passed into a chained project from a calling project.
BF_CLASS Build Forge class for the project
BF_ENGINE A string that uniquely identifies the engine. This value is also stored in a file in the installation directory: engine.id. Example: D8531015-6C07-1014-8CA0-BD58317220B3.
BF_HOST Host name of the logical server (TCP/IP hostname). (This variable is part of the server environment.)
BF_ITERATION Number of times a step in a While Loop has been started successfully. It is incremented when the Condition for the step evaluates to true. A job restart uses the value of this variable as the iteration to restart.
BF_ITERATION_MAX Maximum number of times a While Loop can be run. It is set in the step properties.
BF_ITERATION_MAX_REACHED

Not created or set by default. The step unique ID (BF_SSID) of the While Loop step is appended to this variable when while loop iterations reach BF_ITERATION_MAX. If multiple While Loop steps in a project reach their BF_ITERATION_MAX, this variable contains multiple values, one for each step that reaches the maximum iterations.

BF_LASTGOODRUN Date of the last passing job of the same project, or the last job if no passing job exists.
BF_LASTGOODTAG Tag for the last passing job (or last job, if no passing jobs stored of the same project).
BF_LASTGOODUNIX Same as BF_LASTGOODRUN, but expresses the date in UNIX® format.
BF_LASTRUN Date of the previous run of the current job.
BF_LASTTAG Tag string for the previous job of the same project.
BF_LASTUNIX Same as BF_LASTRUN, but expresses the date in UNIX format.
BF_ONFAIL Halt/Continue flag for the step.
BF_PID Project ID number.
BF_PROJECTNAME Project name of this job.
BF_PROJECTNAME_PHYS Project name as used to create the project directory. The system changes characters specified in the Invalid Relative Dir Characters system setting into underscore characters to create the project directory. For example, if the setting includes a space, then a project named My Project receives a project directory named My_Project.
BF_ROOT Base working directory for the job, taken from job properties. See also BF_STEP_ROOT.
BF_SERVER Server name that the current job is running on (this variable is part of the server environment).
BF_SERVER_ROOT Path assigned to the logical server in the server properties (this variable is part of the server environment).
BF_SID The sequence number of the step result within the build.
BF_SPID Contains the calling project ID if the current job was called by another job. If no the value is the same as BF_PID.
BF_STEPNAME Step name. Set in the step properties.
BF_STEP_ROOT Base working directory for the step, taken from step properties. See also BF_ROOT.
BF_SSID Step ID, unique identifier for the current step in the project.
BF_TAG Tag for the job. Tag definitions can contain variables. This variable contains the value resulting from interpreting those variables at the time the job starts.
BF_TAG_PHYS Tag for the job, with underscores replacing any spaces that were in the BF_TAG value. If a step has the Absolute option selected, then BF_TAG_PHYS is the same as BF_TAG.
BF_USER User name of the job owner.

Feedback