diff --git a/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2018-09-01/containerregistry_build.json b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2018-09-01/containerregistry_build.json index 6ea6800444d3..53f5a497b424 100644 --- a/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2018-09-01/containerregistry_build.json +++ b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2018-09-01/containerregistry_build.json @@ -760,11 +760,6 @@ "$ref": "#/definitions/SourceTriggerDescriptor", "description": "The source trigger that caused the run." }, - "isArchiveEnabled": { - "description": "The value that indicates whether archiving is enabled or not.", - "default": false, - "type": "boolean" - }, "platform": { "$ref": "#/definitions/PlatformProperties", "description": "The platform properties against which the run will happen." @@ -773,6 +768,17 @@ "$ref": "#/definitions/AgentProperties", "description": "The machine configuration of the run agent." }, + "sourceRegistryAuth": { + "description": "The scope of the credentials that were used to login to the source registry during this run.", + "type": "string" + }, + "customRegistries": { + "description": "The list of custom registries that were logged in during this run.", + "type": "array", + "items": { + "type": "string" + } + }, "provisioningState": { "description": "The provisioning state of a run.", "enum": [ @@ -788,6 +794,11 @@ "name": "ProvisioningState", "modelAsString": true } + }, + "isArchiveEnabled": { + "description": "The value that indicates whether archiving is enabled or not.", + "default": false, + "type": "boolean" } } }, @@ -1141,6 +1152,10 @@ "trigger": { "$ref": "#/definitions/TriggerProperties", "description": "The properties that describe all triggers for the task." + }, + "credentials": { + "$ref": "#/definitions/Credentials", + "description": "The properties that describes a set of credentials that will be used when this run is invoked." } } }, @@ -1198,6 +1213,23 @@ } } }, + "Credentials": { + "description": "The parameters that describes a set of credentials that will be used when a run is invoked.", + "type": "object", + "properties": { + "sourceRegistry": { + "$ref": "#/definitions/SourceRegistryCredentials", + "description": "Describes the credential parameters for accessing the source registry." + }, + "customRegistries": { + "description": "Describes the credential parameters for accessing other custom registries. The key\r\nfor the dictionary item will be the registry login server (myregistry.azurecr.io) and\r\nthe value of the item will be the registry credentials for accessing the registry.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CustomRegistryCredentials" + } + } + } + }, "BaseImageDependency": { "description": "Properties that describe a base image dependency.", "type": "object", @@ -1316,6 +1348,38 @@ } } }, + "SourceRegistryCredentials": { + "description": "Describes the credential parameters for accessing the source registry.", + "type": "object", + "properties": { + "loginMode": { + "description": "The authentication mode which determines the source registry login scope. The credentials for the source registry\r\nwill be generated using the given scope. These credentials will be used to login to\r\nthe source registry during the run.", + "enum": [ + "None", + "Default" + ], + "type": "string", + "x-ms-enum": { + "name": "SourceRegistryLoginMode", + "modelAsString": true + } + } + } + }, + "CustomRegistryCredentials": { + "description": "Describes the credentials that will be used to access a custom registry during a run.", + "type": "object", + "properties": { + "userName": { + "$ref": "#/definitions/SecretObject", + "description": "The username for logging into the custom registry." + }, + "password": { + "$ref": "#/definitions/SecretObject", + "description": "The password for logging into the custom registry. The password is a secret \r\nobject that allows multiple ways of providing the value for it." + } + } + }, "SourceProperties": { "description": "The properties of the source code repository.", "required": [ @@ -1350,6 +1414,27 @@ } } }, + "SecretObject": { + "description": "Describes the properties of a secret object value.", + "type": "object", + "properties": { + "value": { + "description": "The value of the secret. The format of this value will be determined\r\nbased on the type of the secret object. If the type is Opaque, the value will be\r\nused as is without any modification.", + "type": "string" + }, + "type": { + "description": "The type of the secret object which determines how the value of the secret object has to be\r\ninterpreted.", + "enum": [ + "Opaque" + ], + "type": "string", + "x-ms-enum": { + "name": "SecretObjectType", + "modelAsString": true + } + } + } + }, "AuthInfo": { "description": "The authorization properties for accessing the source code repository.", "required": [ @@ -1443,6 +1528,10 @@ "trigger": { "$ref": "#/definitions/TriggerUpdateParameters", "description": "The properties for updating trigger properties." + }, + "credentials": { + "$ref": "#/definitions/Credentials", + "description": "The parameters that describes a set of credentials that will be used when this run is invoked." } } }, @@ -1777,6 +1866,10 @@ "description": "The Docker file path relative to the source location.", "type": "string" }, + "target": { + "description": "The name of the target build stage for the docker build.", + "type": "string" + }, "arguments": { "description": "The collection of override arguments to be used when executing the run.", "type": "array", @@ -1803,6 +1896,10 @@ "sourceLocation": { "description": "The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository.\r\nIf it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API.", "type": "string" + }, + "credentials": { + "$ref": "#/definitions/Credentials", + "description": "The properties that describes a set of credentials that will be used when this run is invoked." } }, "x-ms-discriminator-value": "DockerBuildRequest" @@ -1878,6 +1975,10 @@ "sourceLocation": { "description": "The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository.\r\nIf it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API.", "type": "string" + }, + "credentials": { + "$ref": "#/definitions/Credentials", + "description": "The properties that describes a set of credentials that will be used when this run is invoked." } }, "x-ms-discriminator-value": "FileTaskRunRequest" @@ -1980,6 +2081,10 @@ "sourceLocation": { "description": "The URL(absolute or relative) of the source context. It can be an URL to a tar or git repository.\r\nIf it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API.", "type": "string" + }, + "credentials": { + "$ref": "#/definitions/Credentials", + "description": "The properties that describes a set of credentials that will be used when this run is invoked." } }, "x-ms-discriminator-value": "EncodedTaskRunRequest" @@ -2017,6 +2122,10 @@ "description": "The Docker file path relative to the source context.", "type": "string" }, + "target": { + "description": "The name of the target build stage for the docker build.", + "type": "string" + }, "arguments": { "description": "The collection of override arguments to be used when executing this build step.", "type": "array", @@ -2121,6 +2230,10 @@ "items": { "$ref": "#/definitions/Argument" } + }, + "target": { + "description": "The name of the target build stage for the docker build.", + "type": "string" } }, "x-ms-discriminator-value": "Docker" diff --git a/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2018-09-01/examples/RegistriesScheduleRun_Task_WithCustomCredentials.json b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2018-09-01/examples/RegistriesScheduleRun_Task_WithCustomCredentials.json new file mode 100644 index 000000000000..4eafc8ac646d --- /dev/null +++ b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2018-09-01/examples/RegistriesScheduleRun_Task_WithCustomCredentials.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "4385cf00-2d3a-425a-832f-f4285b1c9dce", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "api-version": "2018-09-01", + "runRequest": { + "type": "TaskRunRequest", + "values": [ + { + "name": "mytestargument", + "value": "mytestvalue", + "isSecret": false + }, + { + "name": "mysecrettestargument", + "value": "mysecrettestvalue", + "isSecret": true + } + ], + "taskName": "myTask", + "credentials": { + "sourceRegistry": { + "loginMode": "Default" + }, + "customRegistries": { + "myregistry.azurecr.io": { + "userName": { + "type": "Opaque", + "value": "reg1" + }, + "password": { + "type": "Opaque", + "value": "***" + } + } + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "provisioningState": "Succeeded", + "runId": "0accec26-d6de-4757-8e74-d080f38eaaab", + "status": "Succeeded", + "lastUpdatedTime": "2018-01-25T05:13:51.617Z" + }, + "id": "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/runs/0accec26-d6de-4757-8e74-d080f38eaaab", + "name": "0accec26-d6de-4757-8e74-d080f38eaaab", + "type": "Microsoft.ContainerRegistry/registries/run" + } + }, + "202": {} + } +} \ No newline at end of file diff --git a/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2018-09-01/examples/RegistriesScheduleRun_WithCustomCredentials.json b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2018-09-01/examples/RegistriesScheduleRun_WithCustomCredentials.json new file mode 100644 index 000000000000..ecd8d6c3b889 --- /dev/null +++ b/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2018-09-01/examples/RegistriesScheduleRun_WithCustomCredentials.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "subscriptionId": "4385cf00-2d3a-425a-832f-f4285b1c9dce", + "resourceGroupName": "myResourceGroup", + "registryName": "myRegistry", + "api-version": "2018-09-01", + "runRequest": { + "type": "DockerBuildRequest", + "isArchiveEnabled": true, + "imageNames": [ + "azurerest:testtag" + ], + "noCache": true, + "sourceLocation": "https://myaccount.blob.core.windows.net/sascontainer/source.zip?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D", + "arguments": [ + { + "name": "mytestargument", + "value": "mytestvalue", + "isSecret": false + }, + { + "name": "mysecrettestargument", + "value": "mysecrettestvalue", + "isSecret": true + } + ], + "isPushEnabled": true, + "platform": { + "os": "Linux", + "architecture": "amd64" + }, + "agentConfiguration": { + "cpu": 2 + }, + "dockerFilePath": "DockerFile", + "target": "stage1", + "credentials": { + "sourceRegistry": { + "loginMode": "Default" + }, + "customRegistries": { + "myregistry.azurecr.io": { + "userName": { + "Type": "Opaque", + "Value": "reg1" + }, + "password": { + "Type": "Opaque", + "Value": "***" + } + }, + "myregistry2.azurecr.io": { + "userName": { + "Type": "Opaque", + "Value": "reg2" + }, + "password": { + "Type": "Opaque", + "Value": "***" + } + } + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "provisioningState": "Succeeded", + "runId": "0accec26-d6de-4757-8e74-d080f38eaaab", + "status": "Succeeded", + "lastUpdatedTime": "2018-01-25T05:13:51.617Z" + }, + "id": "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/runs/0accec26-d6de-4757-8e74-d080f38eaaab", + "name": "0accec26-d6de-4757-8e74-d080f38eaaab", + "type": "Microsoft.ContainerRegistry/registries/run" + } + }, + "202": {} + } +} \ No newline at end of file