.bset env "<VariableName>=<DesiredValue>" ["<VariableName>=<DesiredValue>"]
.bset selector <SelectorName>
.bset server <ServerName>
.bset buildserver <ServerName>
The .bset command changes project settings temporarily during a job. The
command has several options:
- Use the env option to change the value of one or more project environment
variables during a job. For more information on using the command this way,
see Changing Environment Variable Values During a Job. You can use .bset to set a variable that does not
yet exist. The values set by the .bset command are written to the job record;
they do not update the database record for the environment set. Later jobs
are not affected by the changes, since they get new copies of the environment
set from the database when they launch.
- Use the selector option to change the project selector during a
job. When you change the selector, any steps that follow the step that contains
the .bset selector command use the new project selector, if they do not have
a selector setting of their own (their selector field is set to None).
- Use the server option to change the default project server during
a job. This option has no effect unless the project's Sticky property
is set. Steps after the .bset server command will use the new default server
(if they do not have a selector setting of their own). This allows you to
have a project stick to one server for part of the project, then stick to
a different server for the remainder.
- Use the buildserver option to change the default project server
during a job for project steps that follow the .bset buildserver command.
The buildserver option applies inline and project-level steps and overrides
the server selected for steps that have an existing selector
setting.
The .bset changes do not take effect until the current step completes.
For example, if your step includes multiple commands as in the following example,
the second line operates in an environment unmodified by the .bset command:
.bset env "CompilerVersion=1.1"
compile driverset
When the second line executes, the CompilerVersion value has not been set.
To remedy this, move the compile command to the following step.
You can use backtick syntax to set the server name to the output of a command.
For example, the command
.bset server `SelectAServer.sh`
runs
the SelectAServer.sh script and provides its output as the server name for
the .bset server command.
Note: Using multiple .bset commands in threaded steps is not recommended.