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 = false
cache = "local"
idempotent = false
@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) Force rebuild iftrue
. Default to default value defined in WORKSPACE. Default value isfalse
.cache
- (Optional) Override cacheability of the target. By default, the value is the cacheability of the last command. Possible values arenever
,local
andremote
.idempotent
- (Optional) Consider a target as idempotent (can be rebuilt without impacting dependent). Default value isfalse
.commands
- (Optional) List of commands to run to complete the target. Syntax isextension
command
[mapping]
.
⚠️
Order of commands is important.
Last updated on