Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
from .source_trigger_py3 import SourceTrigger
from .base_image_trigger_py3 import BaseImageTrigger
from .trigger_properties_py3 import TriggerProperties
from .source_registry_credentials_py3 import SourceRegistryCredentials
from .secret_object_py3 import SecretObject
from .custom_registry_credentials_py3 import CustomRegistryCredentials
from .credentials_py3 import Credentials
from .task_py3 import Task
from .platform_update_parameters_py3 import PlatformUpdateParameters
from .task_step_update_parameters_py3 import TaskStepUpdateParameters
Expand Down Expand Up @@ -151,6 +155,10 @@
from .source_trigger import SourceTrigger
from .base_image_trigger import BaseImageTrigger
from .trigger_properties import TriggerProperties
from .source_registry_credentials import SourceRegistryCredentials
from .secret_object import SecretObject
from .custom_registry_credentials import CustomRegistryCredentials
from .credentials import Credentials
from .task import Task
from .platform_update_parameters import PlatformUpdateParameters
from .task_step_update_parameters import TaskStepUpdateParameters
Expand Down Expand Up @@ -205,6 +213,8 @@
SourceTriggerEvent,
TriggerStatus,
BaseImageTriggerType,
SourceRegistryLoginMode,
SecretObjectType,
)

__all__ = [
Expand Down Expand Up @@ -267,6 +277,10 @@
'SourceTrigger',
'BaseImageTrigger',
'TriggerProperties',
'SourceRegistryCredentials',
'SecretObject',
'CustomRegistryCredentials',
'Credentials',
'Task',
'PlatformUpdateParameters',
'TaskStepUpdateParameters',
Expand Down Expand Up @@ -320,4 +334,6 @@
'SourceTriggerEvent',
'TriggerStatus',
'BaseImageTriggerType',
'SourceRegistryLoginMode',
'SecretObjectType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,14 @@ class BaseImageTriggerType(str, Enum):

all = "All"
runtime = "Runtime"


class SourceRegistryLoginMode(str, Enum):

none = "None"
default = "Default"


class SecretObjectType(str, Enum):

opaque = "Opaque"
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class Credentials(Model):
"""The parameters that describes a set of credentials that will be used when a
run is invoked.

:param source_registry: Describes the credential parameters for accessing
the source registry.
:type source_registry:
~azure.mgmt.containerregistry.v2018_09_01.models.SourceRegistryCredentials
:param custom_registries: Describes the credential parameters for
accessing other custom registries. The key
for the dictionary item will be the registry login server
(myregistry.azurecr.io) and
the value of the item will be the registry credentials for accessing the
registry.
:type custom_registries: dict[str,
~azure.mgmt.containerregistry.v2018_09_01.models.CustomRegistryCredentials]
"""

_attribute_map = {
'source_registry': {'key': 'sourceRegistry', 'type': 'SourceRegistryCredentials'},
'custom_registries': {'key': 'customRegistries', 'type': '{CustomRegistryCredentials}'},
}

def __init__(self, **kwargs):
super(Credentials, self).__init__(**kwargs)
self.source_registry = kwargs.get('source_registry', None)
self.custom_registries = kwargs.get('custom_registries', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class Credentials(Model):
"""The parameters that describes a set of credentials that will be used when a
run is invoked.

:param source_registry: Describes the credential parameters for accessing
the source registry.
:type source_registry:
~azure.mgmt.containerregistry.v2018_09_01.models.SourceRegistryCredentials
:param custom_registries: Describes the credential parameters for
accessing other custom registries. The key
for the dictionary item will be the registry login server
(myregistry.azurecr.io) and
the value of the item will be the registry credentials for accessing the
registry.
:type custom_registries: dict[str,
~azure.mgmt.containerregistry.v2018_09_01.models.CustomRegistryCredentials]
"""

_attribute_map = {
'source_registry': {'key': 'sourceRegistry', 'type': 'SourceRegistryCredentials'},
'custom_registries': {'key': 'customRegistries', 'type': '{CustomRegistryCredentials}'},
}

def __init__(self, *, source_registry=None, custom_registries=None, **kwargs) -> None:
super(Credentials, self).__init__(**kwargs)
self.source_registry = source_registry
self.custom_registries = custom_registries
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class CustomRegistryCredentials(Model):
"""Describes the credentials that will be used to access a custom registry
during a run.

:param user_name: The username for logging into the custom registry.
:type user_name:
~azure.mgmt.containerregistry.v2018_09_01.models.SecretObject
:param password: The password for logging into the custom registry. The
password is a secret
object that allows multiple ways of providing the value for it.
:type password:
~azure.mgmt.containerregistry.v2018_09_01.models.SecretObject
"""

_attribute_map = {
'user_name': {'key': 'userName', 'type': 'SecretObject'},
'password': {'key': 'password', 'type': 'SecretObject'},
}

def __init__(self, **kwargs):
super(CustomRegistryCredentials, self).__init__(**kwargs)
self.user_name = kwargs.get('user_name', None)
self.password = kwargs.get('password', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class CustomRegistryCredentials(Model):
"""Describes the credentials that will be used to access a custom registry
during a run.

:param user_name: The username for logging into the custom registry.
:type user_name:
~azure.mgmt.containerregistry.v2018_09_01.models.SecretObject
:param password: The password for logging into the custom registry. The
password is a secret
object that allows multiple ways of providing the value for it.
:type password:
~azure.mgmt.containerregistry.v2018_09_01.models.SecretObject
"""

_attribute_map = {
'user_name': {'key': 'userName', 'type': 'SecretObject'},
'password': {'key': 'password', 'type': 'SecretObject'},
}

def __init__(self, *, user_name=None, password=None, **kwargs) -> None:
super(CustomRegistryCredentials, self).__init__(**kwargs)
self.user_name = user_name
self.password = password
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class DockerBuildRequest(RunRequest):
:param docker_file_path: Required. The Docker file path relative to the
source location.
:type docker_file_path: str
:param target: The name of the target build stage for the docker build.
:type target: str
:param arguments: The collection of override arguments to be used when
executing the run.
:type arguments:
Expand All @@ -52,6 +54,10 @@ class DockerBuildRequest(RunRequest):
If it is relative URL, the relative path should be obtained from calling
listBuildSourceUploadUrl API.
:type source_location: str
:param credentials: The properties that describes a set of credentials
that will be used when this run is invoked.
:type credentials:
~azure.mgmt.containerregistry.v2018_09_01.models.Credentials
"""

_validation = {
Expand All @@ -68,11 +74,13 @@ class DockerBuildRequest(RunRequest):
'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'},
'no_cache': {'key': 'noCache', 'type': 'bool'},
'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'arguments': {'key': 'arguments', 'type': '[Argument]'},
'timeout': {'key': 'timeout', 'type': 'int'},
'platform': {'key': 'platform', 'type': 'PlatformProperties'},
'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'},
'source_location': {'key': 'sourceLocation', 'type': 'str'},
'credentials': {'key': 'credentials', 'type': 'Credentials'},
}

def __init__(self, **kwargs):
Expand All @@ -81,9 +89,11 @@ def __init__(self, **kwargs):
self.is_push_enabled = kwargs.get('is_push_enabled', True)
self.no_cache = kwargs.get('no_cache', False)
self.docker_file_path = kwargs.get('docker_file_path', None)
self.target = kwargs.get('target', None)
self.arguments = kwargs.get('arguments', 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.credentials = kwargs.get('credentials', None)
self.type = 'DockerBuildRequest'
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class DockerBuildRequest(RunRequest):
:param docker_file_path: Required. The Docker file path relative to the
source location.
:type docker_file_path: str
:param target: The name of the target build stage for the docker build.
:type target: str
:param arguments: The collection of override arguments to be used when
executing the run.
:type arguments:
Expand All @@ -52,6 +54,10 @@ class DockerBuildRequest(RunRequest):
If it is relative URL, the relative path should be obtained from calling
listBuildSourceUploadUrl API.
:type source_location: str
:param credentials: The properties that describes a set of credentials
that will be used when this run is invoked.
:type credentials:
~azure.mgmt.containerregistry.v2018_09_01.models.Credentials
"""

_validation = {
Expand All @@ -68,22 +74,26 @@ class DockerBuildRequest(RunRequest):
'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'},
'no_cache': {'key': 'noCache', 'type': 'bool'},
'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'arguments': {'key': 'arguments', 'type': '[Argument]'},
'timeout': {'key': 'timeout', 'type': 'int'},
'platform': {'key': 'platform', 'type': 'PlatformProperties'},
'agent_configuration': {'key': 'agentConfiguration', 'type': 'AgentProperties'},
'source_location': {'key': 'sourceLocation', 'type': 'str'},
'credentials': {'key': 'credentials', 'type': 'Credentials'},
}

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:
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, target: str=None, arguments=None, timeout: int=3600, agent_configuration=None, source_location: str=None, credentials=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.target = target
self.arguments = arguments
self.timeout = timeout
self.platform = platform
self.agent_configuration = agent_configuration
self.source_location = source_location
self.credentials = credentials
self.type = 'DockerBuildRequest'
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class DockerBuildStep(TaskStepProperties):
:param docker_file_path: Required. The Docker file path relative to the
source context.
:type docker_file_path: str
:param target: The name of the target build stage for the docker build.
:type target: str
:param arguments: The collection of override arguments to be used when
executing this build step.
:type arguments:
Expand All @@ -64,6 +66,7 @@ class DockerBuildStep(TaskStepProperties):
'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'},
'no_cache': {'key': 'noCache', 'type': 'bool'},
'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'arguments': {'key': 'arguments', 'type': '[Argument]'},
}

Expand All @@ -73,5 +76,6 @@ def __init__(self, **kwargs):
self.is_push_enabled = kwargs.get('is_push_enabled', True)
self.no_cache = kwargs.get('no_cache', False)
self.docker_file_path = kwargs.get('docker_file_path', None)
self.target = kwargs.get('target', None)
self.arguments = kwargs.get('arguments', None)
self.type = 'Docker'
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class DockerBuildStep(TaskStepProperties):
:param docker_file_path: Required. The Docker file path relative to the
source context.
:type docker_file_path: str
:param target: The name of the target build stage for the docker build.
:type target: str
:param arguments: The collection of override arguments to be used when
executing this build step.
:type arguments:
Expand All @@ -64,14 +66,16 @@ class DockerBuildStep(TaskStepProperties):
'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'},
'no_cache': {'key': 'noCache', 'type': 'bool'},
'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'arguments': {'key': 'arguments', 'type': '[Argument]'},
}

def __init__(self, *, docker_file_path: str, context_path: str=None, context_access_token: str=None, image_names=None, is_push_enabled: bool=True, no_cache: bool=False, arguments=None, **kwargs) -> None:
def __init__(self, *, docker_file_path: str, context_path: str=None, context_access_token: str=None, image_names=None, is_push_enabled: bool=True, no_cache: bool=False, target: str=None, arguments=None, **kwargs) -> None:
super(DockerBuildStep, self).__init__(context_path=context_path, context_access_token=context_access_token, **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.target = target
self.arguments = arguments
self.type = 'Docker'
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class DockerBuildStepUpdateParameters(TaskStepUpdateParameters):
executing this build step.
:type arguments:
list[~azure.mgmt.containerregistry.v2018_09_01.models.Argument]
:param target: The name of the target build stage for the docker build.
:type target: str
"""

_validation = {
Expand All @@ -56,6 +58,7 @@ class DockerBuildStepUpdateParameters(TaskStepUpdateParameters):
'no_cache': {'key': 'noCache', 'type': 'bool'},
'docker_file_path': {'key': 'dockerFilePath', 'type': 'str'},
'arguments': {'key': 'arguments', 'type': '[Argument]'},
'target': {'key': 'target', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -65,4 +68,5 @@ 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.target = kwargs.get('target', None)
self.type = 'Docker'
Loading