Share via


DockerTaskStep Class

public final class DockerTaskStep
extends TaskStepProperties

The Docker build step.

Constructor Summary

Constructor Description
DockerTaskStep()

Creates an instance of DockerTaskStep class.

Method Summary

Modifier and Type Method and Description
List<Argument> arguments()

Get the arguments property: The collection of override arguments to be used when executing this build step.

String dockerFilePath()

Get the dockerFilePath property: The Docker file path relative to the source context.

static DockerTaskStep fromJson(JsonReader jsonReader)

Reads an instance of DockerTaskStep from the JsonReader.

List<String> imageNames()

Get the imageNames property: The fully qualified image names including the repository and tag.

Boolean isPushEnabled()

Get the isPushEnabled property: The value of this property indicates whether the image built should be pushed to the registry or not.

Boolean noCache()

Get the noCache property: The value of this property indicates whether the image cache is enabled or not.

String target()

Get the target property: The name of the target build stage for the docker build.

JsonWriter toJson(JsonWriter jsonWriter)
StepType type()

Get the type property: The type of the step.

void validate()

Validates the instance.

DockerTaskStep withArguments(List<Argument> arguments)

Set the arguments property: The collection of override arguments to be used when executing this build step.

DockerTaskStep withContextAccessToken(String contextAccessToken)

Set the contextAccessToken property: The token (git PAT or SAS token of storage account blob) associated with the context for a step.

DockerTaskStep withContextPath(String contextPath)

Set the contextPath property: The URL(absolute or relative) of the source context for the task step.

DockerTaskStep withDockerFilePath(String dockerFilePath)

Set the dockerFilePath property: The Docker file path relative to the source context.

DockerTaskStep withImageNames(List<String> imageNames)

Set the imageNames property: The fully qualified image names including the repository and tag.

DockerTaskStep withIsPushEnabled(Boolean isPushEnabled)

Set the isPushEnabled property: The value of this property indicates whether the image built should be pushed to the registry or not.

DockerTaskStep withNoCache(Boolean noCache)

Set the noCache property: The value of this property indicates whether the image cache is enabled or not.

DockerTaskStep withTarget(String target)

Set the target property: The name of the target build stage for the docker build.

Methods inherited from TaskStepProperties

Methods inherited from java.lang.Object

Constructor Details

DockerTaskStep

public DockerTaskStep()

Creates an instance of DockerTaskStep class.

Method Details

arguments

public List<Argument> arguments()

Get the arguments property: The collection of override arguments to be used when executing this build step.

Returns:

the arguments value.

dockerFilePath

public String dockerFilePath()

Get the dockerFilePath property: The Docker file path relative to the source context.

Returns:

the dockerFilePath value.

fromJson

public static DockerTaskStep fromJson(JsonReader jsonReader)

Reads an instance of DockerTaskStep from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DockerTaskStep if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

imageNames

public List<String> imageNames()

Get the imageNames property: The fully qualified image names including the repository and tag.

Returns:

the imageNames value.

isPushEnabled

public Boolean isPushEnabled()

Get the isPushEnabled property: The value of this property indicates whether the image built should be pushed to the registry or not.

Returns:

the isPushEnabled value.

noCache

public Boolean noCache()

Get the noCache property: The value of this property indicates whether the image cache is enabled or not.

Returns:

the noCache value.

target

public String target()

Get the target property: The name of the target build stage for the docker build.

Returns:

the target value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

DockerTaskStep.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public StepType type()

Get the type property: The type of the step.

Overrides:

DockerTaskStep.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

DockerTaskStep.validate()

withArguments

public DockerTaskStep withArguments(List<Argument> arguments)

Set the arguments property: The collection of override arguments to be used when executing this build step.

Parameters:

arguments - the arguments value to set.

Returns:

the DockerTaskStep object itself.

withContextAccessToken

public DockerTaskStep withContextAccessToken(String contextAccessToken)

Set the contextAccessToken property: The token (git PAT or SAS token of storage account blob) associated with the context for a step.

Overrides:

DockerTaskStep.withContextAccessToken(String contextAccessToken)

Parameters:

contextAccessToken

withContextPath

public DockerTaskStep withContextPath(String contextPath)

Set the contextPath property: The URL(absolute or relative) of the source context for the task step.

Overrides:

DockerTaskStep.withContextPath(String contextPath)

Parameters:

contextPath

withDockerFilePath

public DockerTaskStep withDockerFilePath(String dockerFilePath)

Set the dockerFilePath property: The Docker file path relative to the source context.

Parameters:

dockerFilePath - the dockerFilePath value to set.

Returns:

the DockerTaskStep object itself.

withImageNames

public DockerTaskStep withImageNames(List<String> imageNames)

Set the imageNames property: The fully qualified image names including the repository and tag.

Parameters:

imageNames - the imageNames value to set.

Returns:

the DockerTaskStep object itself.

withIsPushEnabled

public DockerTaskStep withIsPushEnabled(Boolean isPushEnabled)

Set the isPushEnabled property: The value of this property indicates whether the image built should be pushed to the registry or not.

Parameters:

isPushEnabled - the isPushEnabled value to set.

Returns:

the DockerTaskStep object itself.

withNoCache

public DockerTaskStep withNoCache(Boolean noCache)

Set the noCache property: The value of this property indicates whether the image cache is enabled or not.

Parameters:

noCache - the noCache value to set.

Returns:

the DockerTaskStep object itself.

withTarget

public DockerTaskStep withTarget(String target)

Set the target property: The name of the target build stage for the docker build.

Parameters:

target - the target value to set.

Returns:

the DockerTaskStep object itself.

Applies to