Target Block
The target
block describes requirements for running a target. A target has a unique name in the scope of this file (see identifier).
Example Usage
target build {
depends_on = [ target.^build ]
outputs = [ "dist/*" ]
rebuild = ~auto
artifacts = ~workspace
@npm build { arguments = { configuration: var.config } }
@docker build { }
}
Argument Reference
The following arguments are supported:
identifier
- (Mandatory) Identifier of the target.depends_on
- (Optional) Overridedepends_on
as defined in WORKSPACE. Same syntax, same effects.outputs
- (Optional) Override default outputs for this target. By default, the value is the set ofoutputs
from configuration and used extensions in a target.rebuild
- (Optional) Override default rebuild mode. By default, the target is rebuilt if hash has changed (~auto
by default). Possible values are~auto
(rebuild on changes),~always
(force build) and~cascade
(build with parent within a cluster).artifacts
- (Optional) Override cacheability of the artifacts. By default, the value is the cacheability of the last command. Possible values are~none
,~workspace
,~managed
and~external
.commands
- (Optional) List of commands to run to complete the target. Syntax isextension
command
[mapping]
.
⚠️
Order of commands is important.
Last updated on