Skip to main content
Version: 5.11.x

delivery

Adds steps to the build to create a delivery manifest and optionally run delivery targets to release built artifacts to a remote system when they have changed.

Table of contents

Properties overview

Properties

auto_deliver

auto_deliver: boolean = false

If true, deliver the required artifacts at the end of a build as determined by a delivery manifest.


bazel

bazel: BazelConfiguration

Configuration for the Bazel invocation for this task.

Inherited from

BazelTaskConfiguration.bazel


branches

branches: readonly string[] = ['^main$', '^master$']

A list of branches where releases originate.

Will be treated as a regular expression, and wrapped with ^ and $ if required.


cci

Optional cci: CircleCIConfiguration

Properties relating to CircleCI for the task

Inherited from

BazelTaskConfiguration.cci


env

env: Map<string, string>

Environment variables to set on this task. Overrides those set globally

Inherited from

BazelTaskConfiguration.env


hooks

Optional hooks: TaskHook

List of hooks that apply to all primary tasks by default. This list is combined with a list provided at the workspace and task level. Hooks are run sequentially, starting with hooks at the root level.

Hooks are commands conditionally run at various stages within a task. For example, they can be used for setting up test databases before a test task runs, and then performing cleanup after.

If an id is supplied for a hook, you can override it at the workspace and task level.

A hook definition can take a when condition to allow for applying hooks to a particular task type, or the use of other conditional expressions. If you supply a custom when condition on a hook at the root level, the default behavior of running only on primary task types is dropped, and must be supplied on the custom condition.

For example, to run a hook on all primary tasks on the main branch:

hooks:
- type: before_task
command: docker login
when:
and:
- task:
primary: true
- branches
- main
tip

To avoid repeating hooks, use YAML anchors (&) and aliases (*), for example:

tasks:
- test:
targets:
- ...
hooks: &hooks
- type: before_task
...
- warming:
hooks: *hooks

If you don't supply a custom condition, the hook runs on all primary task types. A primary task is one of the following types:

  • build
  • buildifier
  • configure
  • delivery
  • format
  • gazelle
  • lint
  • test
  • warming

See

ConditionExpression for more information on conditions.

Inherited from

BazelTaskConfiguration.hooks



icon

icon: string = 'bazel'

The emoji icon used in the tasks label

Inherited from

BazelTaskConfiguration.icon


manifest_only

manifest_only: boolean = false

Only generate the delivery manifest


queue

Optional queue: string

The queue / runner pool that this task will run on. By default, takes the value of the top level 'queue' property in the Workflows configuration.

Inherited from

BazelTaskConfiguration.queue


redis_url

Optional redis_url: string

Redis endpoint for storing previously-seen artifacts. If this property is set, it will be used as an override for the endpoint of the Redis instance managed by Workflows.


redis_use_tls

redis_use_tls: boolean = true

If the client should use tls when connecting to redis


stamp_flags

stamp_flags: readonly string[]

Set of flags to additionally set when building artifacts for delivery


timeout_in_minutes

timeout_in_minutes: number = 180

The amount of time in minutes that this step will time out after. Timed out steps will cause the build to fail.

Inherited from

BazelTaskConfiguration.timeoutInMinutes


without

without: boolean = false

Setting this will exclude this task from being created when using additional workspace overrides

Inherited from

BazelTaskConfiguration.without