Share via


DockerBuildRequest Class

public final class DockerBuildRequest
extends RunRequest

The parameters for a docker quick build.

Constructor Summary

Constructor Description
DockerBuildRequest()

Creates an instance of DockerBuildRequest class.

Method Summary

Modifier and Type Method and Description
AgentProperties agentConfiguration()

Get the agentConfiguration property: The machine configuration of the run agent.

List<Argument> arguments()

Get the arguments property: The collection of override arguments to be used when executing the run.

Credentials credentials()

Get the credentials property: The properties that describes a set of credentials that will be used when this run is invoked.

String dockerFilePath()

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

static DockerBuildRequest fromJson(JsonReader jsonReader)

Reads an instance of DockerBuildRequest 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.

PlatformProperties platform()

Get the platform property: The platform properties against which the run has to happen.

String sourceLocation()

Get the sourceLocation property: The URL(absolute or relative) of the source context.

String target()

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

Integer timeout()

Get the timeout property: Run timeout in seconds.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the run request.

void validate()

Validates the instance.

DockerBuildRequest withAgentConfiguration(AgentProperties agentConfiguration)

Set the agentConfiguration property: The machine configuration of the run agent.

DockerBuildRequest withAgentPoolName(String agentPoolName)

Set the agentPoolName property: The dedicated agent pool for the run.

DockerBuildRequest withArguments(List<Argument> arguments)

Set the arguments property: The collection of override arguments to be used when executing the run.

DockerBuildRequest withCredentials(Credentials credentials)

Set the credentials property: The properties that describes a set of credentials that will be used when this run is invoked.

DockerBuildRequest withDockerFilePath(String dockerFilePath)

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

DockerBuildRequest withImageNames(List<String> imageNames)

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

DockerBuildRequest withIsArchiveEnabled(Boolean isArchiveEnabled)

Set the isArchiveEnabled property: The value that indicates whether archiving is enabled for the run or not.

DockerBuildRequest 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.

DockerBuildRequest withLogTemplate(String logTemplate)

Set the logTemplate property: The template that describes the repository and tag information for run log artifact.

DockerBuildRequest withNoCache(Boolean noCache)

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

DockerBuildRequest withPlatform(PlatformProperties platform)

Set the platform property: The platform properties against which the run has to happen.

DockerBuildRequest withSourceLocation(String sourceLocation)

Set the sourceLocation property: The URL(absolute or relative) of the source context.

DockerBuildRequest withTarget(String target)

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

DockerBuildRequest withTimeout(Integer timeout)

Set the timeout property: Run timeout in seconds.

Methods inherited from RunRequest

Methods inherited from java.lang.Object

Constructor Details

DockerBuildRequest

public DockerBuildRequest()

Creates an instance of DockerBuildRequest class.

Method Details

agentConfiguration

public AgentProperties agentConfiguration()

Get the agentConfiguration property: The machine configuration of the run agent.

Returns:

the agentConfiguration value.

arguments

public List<Argument> arguments()

Get the arguments property: The collection of override arguments to be used when executing the run.

Returns:

the arguments value.

credentials

public Credentials credentials()

Get the credentials property: The properties that describes a set of credentials that will be used when this run is invoked.

Returns:

the credentials value.

dockerFilePath

public String dockerFilePath()

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

Returns:

the dockerFilePath value.

fromJson

public static DockerBuildRequest fromJson(JsonReader jsonReader)

Reads an instance of DockerBuildRequest from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DockerBuildRequest 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.

platform

public PlatformProperties platform()

Get the platform property: The platform properties against which the run has to happen.

Returns:

the platform value.

sourceLocation

public String sourceLocation()

Get the sourceLocation property: The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository. If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API.

Returns:

the sourceLocation value.

target

public String target()

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

Returns:

the target value.

timeout

public Integer timeout()

Get the timeout property: Run timeout in seconds.

Returns:

the timeout value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

DockerBuildRequest.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the run request.

Overrides:

DockerBuildRequest.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

DockerBuildRequest.validate()

withAgentConfiguration

public DockerBuildRequest withAgentConfiguration(AgentProperties agentConfiguration)

Set the agentConfiguration property: The machine configuration of the run agent.

Parameters:

agentConfiguration - the agentConfiguration value to set.

Returns:

the DockerBuildRequest object itself.

withAgentPoolName

public DockerBuildRequest withAgentPoolName(String agentPoolName)

Set the agentPoolName property: The dedicated agent pool for the run.

Overrides:

DockerBuildRequest.withAgentPoolName(String agentPoolName)

Parameters:

agentPoolName

withArguments

public DockerBuildRequest withArguments(List<Argument> arguments)

Set the arguments property: The collection of override arguments to be used when executing the run.

Parameters:

arguments - the arguments value to set.

Returns:

the DockerBuildRequest object itself.

withCredentials

public DockerBuildRequest withCredentials(Credentials credentials)

Set the credentials property: The properties that describes a set of credentials that will be used when this run is invoked.

Parameters:

credentials - the credentials value to set.

Returns:

the DockerBuildRequest object itself.

withDockerFilePath

public DockerBuildRequest withDockerFilePath(String dockerFilePath)

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

Parameters:

dockerFilePath - the dockerFilePath value to set.

Returns:

the DockerBuildRequest object itself.

withImageNames

public DockerBuildRequest 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 DockerBuildRequest object itself.

withIsArchiveEnabled

public DockerBuildRequest withIsArchiveEnabled(Boolean isArchiveEnabled)

Set the isArchiveEnabled property: The value that indicates whether archiving is enabled for the run or not.

Overrides:

DockerBuildRequest.withIsArchiveEnabled(Boolean isArchiveEnabled)

Parameters:

isArchiveEnabled

withIsPushEnabled

public DockerBuildRequest 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 DockerBuildRequest object itself.

withLogTemplate

public DockerBuildRequest withLogTemplate(String logTemplate)

Set the logTemplate property: The template that describes the repository and tag information for run log artifact.

Overrides:

DockerBuildRequest.withLogTemplate(String logTemplate)

Parameters:

logTemplate

withNoCache

public DockerBuildRequest 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 DockerBuildRequest object itself.

withPlatform

public DockerBuildRequest withPlatform(PlatformProperties platform)

Set the platform property: The platform properties against which the run has to happen.

Parameters:

platform - the platform value to set.

Returns:

the DockerBuildRequest object itself.

withSourceLocation

public DockerBuildRequest withSourceLocation(String sourceLocation)

Set the sourceLocation property: The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository. If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API.

Parameters:

sourceLocation - the sourceLocation value to set.

Returns:

the DockerBuildRequest object itself.

withTarget

public DockerBuildRequest 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 DockerBuildRequest object itself.

withTimeout

public DockerBuildRequest withTimeout(Integer timeout)

Set the timeout property: Run timeout in seconds.

Parameters:

timeout - the timeout value to set.

Returns:

the DockerBuildRequest object itself.

Applies to