Skip to content

Commit

Permalink
Generated from 13f78c9f9be8ff71afffbe76b21c7b0687b70ea8 (#3452)
Browse files Browse the repository at this point in the history
Add ContextPath and source location URL for encode task and run type, add support for pull request based trigger.
  • Loading branch information
AutorestCI authored Oct 1, 2018
1 parent 54bdf99 commit 366c1a1
Show file tree
Hide file tree
Showing 39 changed files with 182 additions and 161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class BaseImageTrigger(Model):
base image dependency updates. Possible values include: 'All', 'Runtime'
:type base_image_trigger_type: str or
~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageTriggerType
:param status: The current status of build trigger. Possible values
include: 'Disabled', 'Enabled'
:param status: The current status of trigger. Possible values include:
'Disabled', 'Enabled'
:type status: str or
~azure.mgmt.containerregistry.v2018_09_01.models.TriggerStatus
:param name: Required. The name of the trigger.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class BaseImageTrigger(Model):
base image dependency updates. Possible values include: 'All', 'Runtime'
:type base_image_trigger_type: str or
~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageTriggerType
:param status: The current status of build trigger. Possible values
include: 'Disabled', 'Enabled'
:param status: The current status of trigger. Possible values include:
'Disabled', 'Enabled'
:type status: str or
~azure.mgmt.containerregistry.v2018_09_01.models.TriggerStatus
:param name: Required. The name of the trigger.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class BaseImageTriggerUpdateParameters(Model):
image dependency updates. Possible values include: 'All', 'Runtime'
:type base_image_trigger_type: str or
~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageTriggerType
:param status: The current status of build trigger. Possible values
include: 'Disabled', 'Enabled'
:param status: The current status of trigger. Possible values include:
'Disabled', 'Enabled'
:type status: str or
~azure.mgmt.containerregistry.v2018_09_01.models.TriggerStatus
:param name: Required. The name of the trigger.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class BaseImageTriggerUpdateParameters(Model):
image dependency updates. Possible values include: 'All', 'Runtime'
:type base_image_trigger_type: str or
~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageTriggerType
:param status: The current status of build trigger. Possible values
include: 'Disabled', 'Enabled'
:param status: The current status of trigger. Possible values include:
'Disabled', 'Enabled'
:type status: str or
~azure.mgmt.containerregistry.v2018_09_01.models.TriggerStatus
:param name: Required. The name of the trigger.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ class RunStatus(str, Enum):
class RunType(str, Enum):

quick_build = "QuickBuild"
quick_run = "QuickRun"
auto_build = "AutoBuild"
auto_run = "AutoRun"


class OS(str, Enum):
Expand Down Expand Up @@ -145,6 +147,7 @@ class TokenType(str, Enum):
class SourceTriggerEvent(str, Enum):

commit = "commit"
pullrequest = "pullrequest"


class TriggerStatus(str, Enum):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,25 @@ class DockerBuildRequest(RunRequest):
executing the run.
:type arguments:
list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument]
:param source_location: Required. The URL(absolute or relative) of the
source that needs to be built. For Docker build, it can be an URL to a tar
or github repoistory as supported by Docker.
If it is relative URL, the relative path should be obtained from calling
getSourceUploadUrl API.
:type source_location: str
:param timeout: Build timeout in seconds. Default value: 3600 .
:param timeout: Run timeout in seconds. Default value: 3600 .
:type timeout: int
:param platform: Required. The platform properties against which the build
will happen.
:param platform: Required. The platform properties against which the run
has to happen.
:type platform:
~azure.mgmt.containerregistry.v2018_09_01.models.PlatformProperties
:param agent_configuration: The machine configuration of the build agent.
:param agent_configuration: The machine configuration of the run agent.
:type agent_configuration:
~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties
:param source_location: The URL(absolute or relative) of the source
context. It can be an URL to a tar or git repoistory.
If it is relative URL, the relative path should be obtained from calling
listBuildSourceUploadUrl API.
:type source_location: str
"""

_validation = {
'type': {'required': True},
'docker_file_path': {'required': True},
'source_location': {'required': True},
'timeout': {'maximum': 28800, 'minimum': 300},
'platform': {'required': True},
}
Expand All @@ -71,10 +69,10 @@ class DockerBuildRequest(RunRequest):
'no_cache': {'key': 'noCache', 'type': 'bool'},
'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
'arguments': {'key': 'arguments', 'type': '[Argument]'},
'source_location': {'key': 'sourceLocation', 'type': 'str'},
'timeout': {'key': 'timeout', 'type': 'int'},
'platform': {'key': 'platform', 'type': 'PlatformProperties'},
'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'},
'source_location': {'key': 'sourceLocation', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -84,8 +82,8 @@ def __init__(self, **kwargs):
self.no_cache = kwargs.get('no_cache', False)
self.docker_file_path = kwargs.get('docker_file_path', None)
self.arguments = kwargs.get('arguments', None)
self.source_location = kwargs.get('source_location', None)
self.timeout = kwargs.get('timeout', 3600)
self.platform = kwargs.get('platform', None)
self.agent_configuration = kwargs.get('agent_configuration', None)
self.source_location = kwargs.get('source_location', None)
self.type = 'DockerBuildRequest'
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,25 @@ class DockerBuildRequest(RunRequest):
executing the run.
:type arguments:
list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument]
:param source_location: Required. The URL(absolute or relative) of the
source that needs to be built. For Docker build, it can be an URL to a tar
or github repoistory as supported by Docker.
If it is relative URL, the relative path should be obtained from calling
getSourceUploadUrl API.
:type source_location: str
:param timeout: Build timeout in seconds. Default value: 3600 .
:param timeout: Run timeout in seconds. Default value: 3600 .
:type timeout: int
:param platform: Required. The platform properties against which the build
will happen.
:param platform: Required. The platform properties against which the run
has to happen.
:type platform:
~azure.mgmt.containerregistry.v2018_09_01.models.PlatformProperties
:param agent_configuration: The machine configuration of the build agent.
:param agent_configuration: The machine configuration of the run agent.
:type agent_configuration:
~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties
:param source_location: The URL(absolute or relative) of the source
context. It can be an URL to a tar or git repoistory.
If it is relative URL, the relative path should be obtained from calling
listBuildSourceUploadUrl API.
:type source_location: str
"""

_validation = {
'type': {'required': True},
'docker_file_path': {'required': True},
'source_location': {'required': True},
'timeout': {'maximum': 28800, 'minimum': 300},
'platform': {'required': True},
}
Expand All @@ -71,21 +69,21 @@ class DockerBuildRequest(RunRequest):
'no_cache': {'key': 'noCache', 'type': 'bool'},
'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
'arguments': {'key': 'arguments', 'type': '[Argument]'},
'source_location': {'key': 'sourceLocation', 'type': 'str'},
'timeout': {'key': 'timeout', 'type': 'int'},
'platform': {'key': 'platform', 'type': 'PlatformProperties'},
'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'},
'source_location': {'key': 'sourceLocation', 'type': 'str'},
}

def __init__(self, *, docker_file_path: str, source_location: str, platform, is_archive_enabled: bool=False, image_names=None, is_push_enabled: bool=True, no_cache: bool=False, arguments=None, timeout: int=3600, agent_configuration=None, **kwargs) -> None:
def __init__(self, *, docker_file_path: str, platform, is_archive_enabled: bool=False, image_names=None, is_push_enabled: bool=True, no_cache: bool=False, arguments=None, timeout: int=3600, agent_configuration=None, source_location: str=None, **kwargs) -> None:
super(DockerBuildRequest, self).__init__(is_archive_enabled=is_archive_enabled, **kwargs)
self.image_names = image_names
self.is_push_enabled = is_push_enabled
self.no_cache = no_cache
self.docker_file_path = docker_file_path
self.arguments = arguments
self.source_location = source_location
self.timeout = timeout
self.platform = platform
self.agent_configuration = agent_configuration
self.source_location = source_location
self.type = 'DockerBuildRequest'
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class DockerBuildStep(TaskStepProperties):
:ivar base_image_dependencies: List of base image dependencies for a step.
:vartype base_image_dependencies:
list[~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageDependency]
:param context_path: The URL(absolute or relative) of the source context
for the task step.
:type context_path: str
:param type: Required. Constant filled by server.
:type type: str
:param image_names: The fully qualified image names including the
Expand All @@ -41,11 +44,6 @@ class DockerBuildStep(TaskStepProperties):
executing this build step.
:type arguments:
list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument]
:param context_path: The URL(absolute or relative) of the source context
for the build task.
If it is relative, the context will be relative to the source repository
URL of the build task.
:type context_path: str
"""

_validation = {
Expand All @@ -56,13 +54,13 @@ class DockerBuildStep(TaskStepProperties):

_attribute_map = {
'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'},
'context_path': {'key': 'contextPath', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'image_names': {'key': 'imageNames', 'type': '[str]'},
'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'},
'no_cache': {'key': 'noCache', 'type': 'bool'},
'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
'arguments': {'key': 'arguments', 'type': '[Argument]'},
'context_path': {'key': 'contextPath', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -72,5 +70,4 @@ def __init__(self, **kwargs):
self.no_cache = kwargs.get('no_cache', False)
self.docker_file_path = kwargs.get('docker_file_path', None)
self.arguments = kwargs.get('arguments', None)
self.context_path = kwargs.get('context_path', None)
self.type = 'Docker'
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class DockerBuildStep(TaskStepProperties):
:ivar base_image_dependencies: List of base image dependencies for a step.
:vartype base_image_dependencies:
list[~azure.mgmt.containerregistry.v2018_09_01.models.BaseImageDependency]
:param context_path: The URL(absolute or relative) of the source context
for the task step.
:type context_path: str
:param type: Required. Constant filled by server.
:type type: str
:param image_names: The fully qualified image names including the
Expand All @@ -41,11 +44,6 @@ class DockerBuildStep(TaskStepProperties):
executing this build step.
:type arguments:
list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument]
:param context_path: The URL(absolute or relative) of the source context
for the build task.
If it is relative, the context will be relative to the source repository
URL of the build task.
:type context_path: str
"""

_validation = {
Expand All @@ -56,21 +54,20 @@ class DockerBuildStep(TaskStepProperties):

_attribute_map = {
'base_image_dependencies': {'key': 'baseImageDependencies', 'type': '[BaseImageDependency]'},
'context_path': {'key': 'contextPath', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'image_names': {'key': 'imageNames', 'type': '[str]'},
'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'},
'no_cache': {'key': 'noCache', 'type': 'bool'},
'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
'arguments': {'key': 'arguments', 'type': '[Argument]'},
'context_path': {'key': 'contextPath', 'type': 'str'},
}

def __init__(self, *, docker_file_path: str, image_names=None, is_push_enabled: bool=True, no_cache: bool=False, arguments=None, context_path: str=None, **kwargs) -> None:
super(DockerBuildStep, self).__init__(**kwargs)
def __init__(self, *, docker_file_path: str, context_path: str=None, image_names=None, is_push_enabled: bool=True, no_cache: bool=False, arguments=None, **kwargs) -> None:
super(DockerBuildStep, self).__init__(context_path=context_path, **kwargs)
self.image_names = image_names
self.is_push_enabled = is_push_enabled
self.no_cache = no_cache
self.docker_file_path = docker_file_path
self.arguments = arguments
self.context_path = context_path
self.type = 'Docker'
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ class DockerBuildStepUpdateParameters(TaskStepUpdateParameters):
All required parameters must be populated in order to send to Azure.
:param context_path: The URL(absolute or relative) of the source context
for the task step.
:type context_path: str
:param type: Required. Constant filled by server.
:type type: str
:param image_names: The fully qualified image names including the
Expand All @@ -35,25 +38,20 @@ class DockerBuildStepUpdateParameters(TaskStepUpdateParameters):
executing this build step.
:type arguments:
list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument]
:param context_path: The URL(absolute or relative) of the source context
for the build task.
If it is relative, the context will be relative to the source repository
URL of the build task.
:type context_path: str
"""

_validation = {
'type': {'required': True},
}

_attribute_map = {
'context_path': {'key': 'contextPath', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'image_names': {'key': 'imageNames', 'type': '[str]'},
'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'},
'no_cache': {'key': 'noCache', 'type': 'bool'},
'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
'arguments': {'key': 'arguments', 'type': '[Argument]'},
'context_path': {'key': 'contextPath', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -63,5 +61,4 @@ def __init__(self, **kwargs):
self.no_cache = kwargs.get('no_cache', None)
self.docker_file_path = kwargs.get('docker_file_path', None)
self.arguments = kwargs.get('arguments', None)
self.context_path = kwargs.get('context_path', None)
self.type = 'Docker'
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ class DockerBuildStepUpdateParameters(TaskStepUpdateParameters):
All required parameters must be populated in order to send to Azure.
:param context_path: The URL(absolute or relative) of the source context
for the task step.
:type context_path: str
:param type: Required. Constant filled by server.
:type type: str
:param image_names: The fully qualified image names including the
Expand All @@ -35,33 +38,27 @@ class DockerBuildStepUpdateParameters(TaskStepUpdateParameters):
executing this build step.
:type arguments:
list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument]
:param context_path: The URL(absolute or relative) of the source context
for the build task.
If it is relative, the context will be relative to the source repository
URL of the build task.
:type context_path: str
"""

_validation = {
'type': {'required': True},
}

_attribute_map = {
'context_path': {'key': 'contextPath', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'image_names': {'key': 'imageNames', 'type': '[str]'},
'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'},
'no_cache': {'key': 'noCache', 'type': 'bool'},
'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
'arguments': {'key': 'arguments', 'type': '[Argument]'},
'context_path': {'key': 'contextPath', 'type': 'str'},
}

def __init__(self, *, image_names=None, is_push_enabled: bool=None, no_cache: bool=None, docker_file_path: str=None, arguments=None, context_path: str=None, **kwargs) -> None:
super(DockerBuildStepUpdateParameters, self).__init__(**kwargs)
def __init__(self, *, context_path: str=None, image_names=None, is_push_enabled: bool=None, no_cache: bool=None, docker_file_path: str=None, arguments=None, **kwargs) -> None:
super(DockerBuildStepUpdateParameters, self).__init__(context_path=context_path, **kwargs)
self.image_names = image_names
self.is_push_enabled = is_push_enabled
self.no_cache = no_cache
self.docker_file_path = docker_file_path
self.arguments = arguments
self.context_path = context_path
self.type = 'Docker'
Loading

0 comments on commit 366c1a1

Please sign in to comment.