Configuration for a Workspace
A Workspace is a package in a repository that maps to a single Bazel workspace, where Workflows runs builds for.
There is generally only one workspace, which is considered the default workspace. However, it is not required that this workspace live at the root of a repository.
Each workspace inherits the tasks from the default workspace, but can override as required.
icon
string
- Default:
peacock
The icon to assign the workspace (on CI hosts that support icon customization).
label
string
- Default:
.
Label to give the group. Defaults to the workspace name or '.' for the default workspace.
bazel
Configuration properties for the bazel
invocation for this task.
auto_add_bazelrc_file
boolean
- Default: true
If true, automatically add the bazelrc
file to the invocation
when Workflows detects the file next to the configuration file.
If setting this at the root or workspace level, the file is resolved relative to the current workspace.
auto_bazelrc_file
string
- Default: 'bazelrc'
Name of the default bazelrc file to add to the invocation.
This file should be located next to this configuration file, and will be added automatically if it exists,
unless auto_add_bazelrc_file
is set to false
.
bazel_debug_assistance
boolean
- Default: false
If true, Workflows enables a number of flags and archive extra files that can help debug a number of Bazel issues on CI.
flags
string[]
- Read only
List of Bazel flags to be applied to each invocation.
startup_flags
string[]
- Read only
List of Bazel startup flags to be applied to each invocation..
rcfiles
string[]
- Read only
A set of bazelrc files set on each task.
hooks
- Optional
Task hooks allow execution of extra commands or scripts at different points within a task's lifecycle. For example, they can be used for setting up test databases before a test task runs, and then performing cleanup after.
id
string
- Optional
Identifies a hook uniquely with the configuration. Hooks with the same ID override subsequent definitions of the same hook.
command
string
Script that should be run when this hook triggers. This can be a single command, or a path to a script.
soft_fail
boolean
- Default: false
When true, errors from executing the hooks command are ignored, otherwise they are propagated as the tasks exit code.
type
enum
Type of hook this represents, i.e., when in the lifecycle of a task should this hook execute.
Possible hook types are:
AFTER_TASK
="after_task"
: Hook is run after the task runs.BEFORE_TASK
="before_task"
: Hook is run before the task runs.
tasks
map
:<string, TaskConfiguration>
- Read only
Map of tasks that should be enabled for this workspace. By default, the tasks inherited from the root workspace, so it is not required to list them twice. Tasks listed here have their configuration merged with the root.