Send feedback
Task
Stay organized with collections
Save and categorize content based on your preferences.
A Task represents a unit of work that is executed as part of a Job.
JSON representation
{
// Union field type can be only one of the following:
"container" : {
object (ContainerTask )
}
// End of list of possible types for union field type.
}
Fields
Union field type. The type of Task. type can be only one of the following:
container
object (ContainerTask )
Optional. This task is represented by a container that is executed in the Cloud Build execution environment.
ContainerTask
This task is represented by a container that is executed in the Cloud Build execution environment.
JSON representation
{
"image" : string ,
"command" : [
string
] ,
"args" : [
string
] ,
"env" : {
string : string ,
...
}
}
Fields
image
string
Required. Image is the container image to use.
command[]
string
Optional. Command is the container entrypoint to use. This overrides the default entrypoint defined in the container image.
args[]
string
Optional. Args is the container arguments to use. This overrides the default arguments defined in the container image.
env
map (key: string, value: string)
Optional. Environment variables that are set in the container.
An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-06-02 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-02 UTC."],[],[]]