From 22581c5a3fe87587d1b667eb1ac43bb4ae3b41d9 Mon Sep 17 00:00:00 2001 From: Suyash Saluja Date: Mon, 9 Nov 2020 17:09:53 +0530 Subject: [PATCH 01/11] Initial commit as per PR review --- .../preview/2020-07-13-preview/devops.json | 870 ++++++++++++++++++ ...ePipeline-Sample-AspNet-WindowsWebApp.json | 74 ++ .../examples/DeleteAzurePipeline.json | 16 + .../examples/GetAzurePipeline.json | 41 + .../ListAzurePipelinesByResourceGroup.json | 44 + .../ListAzurePipelinesBySubscription.json | 71 ++ .../examples/ListOperations.json | 64 ++ .../ListPipelineTemplateDefinitions.json | 107 +++ .../examples/UpdateAzurePipeline.json | 49 + 9 files changed, 1336 insertions(+) create mode 100644 specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json create mode 100644 specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json create mode 100644 specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/DeleteAzurePipeline.json create mode 100644 specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetAzurePipeline.json create mode 100644 specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesByResourceGroup.json create mode 100644 specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesBySubscription.json create mode 100644 specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListOperations.json create mode 100644 specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelineTemplateDefinitions.json create mode 100644 specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/UpdateAzurePipeline.json diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json new file mode 100644 index 000000000000..45b65c921dd3 --- /dev/null +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json @@ -0,0 +1,870 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure DevOps", + "description": "Azure DevOps Resource Provider", + "version": "2019-07-01-preview", + "x-ms-code-generation-settings": { + "name": "DevOpsClient" + } + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.DevOps/operations": { + "get": { + "operationId": "Operations_List", + "description": "Lists all the operations supported by Microsoft.DevOps resource provider.", + "tags": [ + "Operations" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The list of supported operations has been fetched successfully.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get a list of operations supported by Microsoft.DevOps resource provider": { + "$ref": "./examples/ListOperations.json" + } + } + } + }, + "/providers/Microsoft.DevOps/pipelineTemplateDefinitions": { + "get": { + "tags": [ + "PipelineTemplateDefinitions" + ], + "operationId": "PipelineTemplateDefinitions_List", + "description": "Lists all pipeline templates which can be used to configure an Azure Pipeline.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "The pipeline template definitions have been fetched successfully.", + "schema": { + "$ref": "#/definitions/PipelineTemplateDefinitionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get the list of pipeline template definitions": { + "$ref": "./examples/ListPipelineTemplateDefinitions.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevOps/pipelines/{pipelineName}": { + "put": { + "operationId": "Pipelines_CreateOrUpdate", + "description": "Creates or updates an Azure Pipeline.", + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "pipelineName", + "description": "The name of the Azure Pipeline resource in ARM.", + "in": "path", + "type": "string", + "required": true, + "x-ms-parameter-location": "method" + }, + { + "name": "createOperationParameters", + "description": "The request payload to create the Azure Pipeline.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Pipeline" + } + } + ], + "responses": { + "202": { + "description": "The request has been accepted for processing and the Azure Pipeline will be configured asynchronously." + }, + "200": { + "description": "The Azure Pipeline has been configured successfully.", + "schema": { + "$ref": "#/definitions/Pipeline" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create an Azure pipeline to deploy a sample ASP.Net application to Azure web-app": { + "$ref": "./examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json" + } + } + }, + "get": { + "operationId": "Pipelines_Get", + "description": "Gets an existing Azure Pipeline.", + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "pipelineName", + "description": "The name of the Azure Pipeline resource in ARM.", + "in": "path", + "type": "string", + "required": true, + "x-ms-parameter-location": "method" + } + ], + "responses": { + "200": { + "description": "The Azure Pipeline has been fetched successfully.", + "schema": { + "$ref": "#/definitions/Pipeline" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get an existing Azure pipeline": { + "$ref": "./examples/GetAzurePipeline.json" + } + } + }, + "patch": { + "operationId": "Pipelines_Update", + "description": "Updates the properties of an Azure Pipeline. Currently, only tags can be updated.", + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "pipelineName", + "description": "The name of the Azure Pipeline resource.", + "in": "path", + "type": "string", + "required": true, + "x-ms-parameter-location": "method" + }, + { + "name": "updateOperationParameters", + "description": "The request payload containing the properties to update in the Azure Pipeline.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PipelineUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "The Azure Pipeline has been updated successfully.", + "schema": { + "$ref": "#/definitions/Pipeline" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get an existing Azure pipeline": { + "$ref": "./examples/UpdateAzurePipeline.json" + } + } + }, + "delete": { + "operationId": "Pipelines_Delete", + "description": "Deletes an Azure Pipeline.", + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "pipelineName", + "description": "The name of the Azure Pipeline resource.", + "in": "path", + "type": "string", + "required": true, + "x-ms-parameter-location": "method" + } + ], + "responses": { + "200": { + "description": "The Azure Pipeline has been deleted successfully." + }, + "204": { + "description": "The Azure Pipeline is not found or has been deleted already." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get an existing Azure pipeline": { + "$ref": "./examples/DeleteAzurePipeline.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevOps/pipelines": { + "get": { + "operationId": "Pipelines_ListByResourceGroup", + "description": "Lists all Azure Pipelines under the specified resource group.", + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Azure Pipelines have been fetched successfully.", + "schema": { + "$ref": "#/definitions/PipelineListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List all Azure Pipelines under the specified resource group": { + "$ref": "./examples/ListAzurePipelinesByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DevOps/pipelines": { + "get": { + "operationId": "Pipelines_ListBySubscription", + "description": "Lists all Azure Pipelines under the specified subscription.", + "tags": [ + "Pipelines" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Azure Pipelines have been fetched successfully.", + "schema": { + "$ref": "#/definitions/PipelineListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List all Azure pipelines under the specified subscription": { + "$ref": "./examples/ListAzurePipelinesBySubscription.json" + } + } + } + } + }, + "definitions": { + "CloudError": { + "x-ms-external": true, + "properties": { + "error": { + "description": "Details of the error from the Pipelines Resource Provider.", + "$ref": "#/definitions/CloudErrorBody" + } + }, + "description": "An error response from the Pipelines Resource Provider." + }, + "CloudErrorBody": { + "x-ms-external": true, + "properties": { + "code": { + "type": "string", + "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." + }, + "message": { + "type": "string", + "description": "A message describing the error, intended to be suitable for display in a user interface." + }, + "target": { + "type": "string", + "description": "The target of the particular error. For example, the name of the property in error or the method where the error occurred." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudErrorBody" + }, + "description": "A list of additional details about the error." + } + }, + "description": "An error response from the Pipelines Resource Provider." + }, + "OperationListResult": { + "properties": { + "value": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of operations supported by Microsoft.DevOps resource provider." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of operations, if there are any." + } + }, + "description": "Result of a request to list all operations supported by Microsoft.DevOps resource provider." + }, + "Operation": { + "properties": { + "name": { + "type": "string", + "readOnly": true, + "description": "Name of the operation." + }, + "isDataAction": { + "type": "string", + "description": "Indicates whether the operation applies to data-plane." + }, + "display": { + "description": "Display information of the operation.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/OperationDisplayValue" + } + }, + "description": "Properties of an Operation." + }, + "OperationDisplayValue": { + "properties": { + "operation": { + "type": "string", + "readOnly": true, + "description": "Friendly name of the operation." + }, + "resource": { + "type": "string", + "readOnly": true, + "description": "Friendly name of the resource type the operation applies to." + }, + "description": { + "type": "string", + "readOnly": true, + "description": "Friendly description of the operation." + }, + "provider": { + "type": "string", + "readOnly": true, + "description": "Friendly name of the resource provider." + } + }, + "description": "Display information of an operation." + }, + "PipelineTemplateDefinitionListResult": { + "type": "object", + "description": "Result of a request to list all pipeline template definitions.", + "properties": { + "value": { + "description": "List of pipeline template definitions.", + "type": "array", + "items": { + "$ref": "#/definitions/PipelineTemplateDefinition" + } + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of pipeline template definitions, if there are any." + } + } + }, + "PipelineTemplateDefinition": { + "type": "object", + "description": "Definition of a pipeline template.", + "properties": { + "id": { + "description": "Unique identifier of the pipeline template.", + "type": "string" + }, + "description": { + "description": "Description of the pipeline enabled by the template.", + "type": "string" + }, + "inputs": { + "description": "List of input parameters required by the template to create a pipeline.", + "type": "array", + "items": { + "$ref": "#/definitions/InputDescriptor" + } + } + }, + "required": [ + "id" + ] + }, + "InputDescriptor": { + "type": "object", + "description": "Representation of a pipeline template input parameter.", + "properties": { + "id": { + "description": "Identifier of the input parameter.", + "type": "string" + }, + "description": { + "description": "Description of the input parameter.", + "type": "string" + }, + "type": { + "description": "Data type of the value of the input parameter.", + "type": "string", + "enum": [ + "String", + "SecureString", + "Int", + "Bool", + "Authorization" + ], + "x-ms-enum": { + "name": "InputDataType", + "modelAsString": true + } + }, + "possibleValues": { + "description": "List of possible values for the input parameter.", + "type": "array", + "items": { + "$ref": "#/definitions/InputValue" + } + } + }, + "required": [ + "id", + "type" + ] + }, + "InputValue": { + "type": "object", + "description": "Representation of a pipeline template input parameter value.", + "properties": { + "value": { + "description": "Value of an input parameter.", + "type": "string" + }, + "displayValue": { + "description": "Description of the input parameter value.", + "type": "string" + } + } + }, + "Pipeline": { + "type": "object", + "description": "Azure DevOps Pipeline used to configure Continuous Integration (CI) & Continuous Delivery (CD) for Azure resources.", + "properties": { + "properties": { + "$ref": "#/definitions/PipelineProperties", + "description": "Custom properties of the Pipeline.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "required": [ + "properties" + ] + }, + "PipelineProperties": { + "type": "object", + "description": "Custom properties of a Pipeline.", + "properties": { + "pipelineId": { + "type": "integer", + "readOnly": true, + "description": "Unique identifier of the Azure Pipeline within the Azure DevOps Project." + }, + "organization": { + "$ref": "#/definitions/OrganizationReference", + "description": "Reference to the Azure DevOps Organization containing the Pipeline." + }, + "project": { + "$ref": "#/definitions/ProjectReference", + "description": "Reference to the Azure DevOps Project containing the Pipeline." + }, + "bootstrapConfiguration": { + "$ref": "#/definitions/BootstrapConfiguration", + "description": "Configuration used to bootstrap the Pipeline." + } + }, + "required": [ + "organization", + "project", + "bootstrapConfiguration" + ] + }, + "OrganizationReference": { + "type": "object", + "description": "Reference to an Azure DevOps Organization.", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Unique immutable identifier for the Azure DevOps Organization." + }, + "name": { + "type": "string", + "description": "Name of the Azure DevOps Organization." + } + }, + "required": [ + "name" + ] + }, + "ProjectReference": { + "type": "object", + "description": "Reference to an Azure DevOps Project.", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Unique immutable identifier of the Azure DevOps Project." + }, + "name": { + "type": "string", + "description": "Name of the Azure DevOps Project." + } + }, + "required": [ + "name" + ] + }, + "BootstrapConfiguration": { + "type": "object", + "description": "Configuration used to bootstrap a Pipeline.", + "properties": { + "repository": { + "$ref": "#/definitions/CodeRepository", + "description": "Repository containing the source code for the pipeline." + }, + "template": { + "$ref": "#/definitions/PipelineTemplate", + "description": "Template used to bootstrap the pipeline." + } + }, + "required": [ + "template" + ] + }, + "CodeRepository": { + "type": "object", + "description": "Repository containing the source code for a pipeline.", + "properties": { + "repositoryType": { + "description": "Type of code repository.", + "type": "string", + "enum": [ + "gitHub", + "vstsGit" + ], + "x-ms-enum": { + "name": "CodeRepositoryType", + "modelAsString": true + } + }, + "id": { + "description": "Unique immutable identifier of the code repository.", + "type": "string" + }, + "defaultBranch": { + "description": "Default branch used to configure Continuous Integration (CI) in the pipeline.", + "type": "string" + }, + "authorization": { + "description": "Authorization info to access the code repository.", + "$ref": "#/definitions/Authorization" + }, + "properties": { + "description": "Repository-specific properties.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-client-flatten": true + } + }, + "required": [ + "repositoryType", + "id", + "defaultBranch" + ] + }, + "Authorization": { + "description": "Authorization info used to access a resource (like code repository).", + "type": "object", + "properties": { + "authorizationType": { + "description": "Type of authorization.", + "type": "string", + "enum": [ + "personalAccessToken" + ], + "x-ms-enum": { + "name": "AuthorizationType", + "modelAsString": true + } + }, + "parameters": { + "description": "Authorization parameters corresponding to the authorization type.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "authorizationType" + ] + }, + "PipelineTemplate": { + "type": "object", + "description": "Template used to bootstrap the pipeline.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the pipeline template." + }, + "parameters": { + "type": "object", + "description": "Dictionary of input parameters used in the pipeline template.", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "id" + ] + }, + "Resource": { + "type": "object", + "description": "An Azure Resource Manager (ARM) resource.", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Resource Id" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Resource Type" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource Tags" + }, + "location": { + "type": "string", + "description": "Resource Location" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Resource Name" + } + }, + "x-ms-azure-resource": true + }, + "PipelineUpdateParameters": { + "type": "object", + "description": "Request payload used to update an existing Azure Pipeline.", + "properties": { + "tags": { + "type": "object", + "description": "Dictionary of key-value pairs to be set as tags on the Azure Pipeline. This will overwrite any existing tags.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "PipelineListResult": { + "description": "Result of a request to list all Azure Pipelines under a given scope.", + "properties": { + "value": { + "description": "List of pipelines.", + "type": "array", + "items": { + "$ref": "#/definitions/Pipeline" + } + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of Pipelines, if there are any." + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Unique identifier of the Azure subscription. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the resource group within the Azure subscription.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "API version to be used with the HTTP request." + } + } +} diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json new file mode 100644 index 000000000000..0a6934d91396 --- /dev/null +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "myAspNetWebAppPipeline-rg", + "pipelineName": "myAspNetWebAppPipeline", + "api-version": "2019-07-01-preview", + "createOperationParameters": { + "location": "South India", + "tags": {}, + "properties": { + "organization": { + "name": "myAspNetWebAppPipeline-org" + }, + "project": { + "name": "myAspNetWebAppPipeline-project" + }, + "bootstrapConfiguration": { + "template": { + "id": "ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp", + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroup": "myAspNetWebAppPipeline-rg", + "webAppName": "myAspNetWebApp", + "location": "South India", + "appServicePlan": "S1 Standard", + "appInsightLocation": "South India", + "azureAuth": "{\"scheme\":\"ServicePrincipal\",\"parameters\":{\"tenantid\":\"{subscriptionTenantId}\",\"objectid\":\"{appObjectId}\",\"serviceprincipalid\":\"{appId}\",\"serviceprincipalkey\":\"{appSecret}\"}}" + } + } + } + } + } + }, + "responses": { + "202": { + "description": "The request has been accepted for processing and the Azure Pipeline will be configured asynchronously.", + "headers": { + "location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline/operations/{operationId}", + "retry-after": "5" + } + }, + "200": { + "description": "The Azure Pipeline has been configured successfully.", + "body": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", + "name": "myAspNetWebAppPipeline", + "type": "Microsoft.DevOps/pipelines", + "location": "South India", + "properties": { + "organization": { + "name": "myAspNetWebAppPipeline-org" + }, + "project": { + "name": "myAspNetWebAppPipeline-project" + }, + "bootstrapConfiguration": { + "template": { + "id": "ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp", + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroup": "myAspNetWebAppPipeline-rg", + "webAppName": "myAspNetWebApp", + "location": "South India", + "appServicePlan": "S1 Standard", + "appInsightLocation": "South India", + "azureAuth": null + } + } + } + } + } + } + } +} diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/DeleteAzurePipeline.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/DeleteAzurePipeline.json new file mode 100644 index 000000000000..87a96b97812a --- /dev/null +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/DeleteAzurePipeline.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "myAspNetWebAppPipeline-rg", + "pipelineName": "myAspNetWebAppPipeline", + "api-version": "2019-07-01-preview" + }, + "responses": { + "200": { + "description": "The Azure Pipeline has been deleted successfully." + }, + "204": { + "description": "The Azure Pipeline is not found or has been deleted already." + } + } +} diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetAzurePipeline.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetAzurePipeline.json new file mode 100644 index 000000000000..e76aa49aeca0 --- /dev/null +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetAzurePipeline.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "myAspNetWebAppPipeline-rg", + "pipelineName": "myAspNetWebAppPipeline", + "api-version": "2019-07-01-preview" + }, + "responses": { + "200": { + "description": "The Azure Pipeline has been configured successfully.", + "body": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", + "name": "myAspNetWebAppPipeline", + "type": "Microsoft.DevOps/pipelines", + "location": "South India", + "properties": { + "organization": { + "name": "myAspNetWebAppPipeline-org" + }, + "project": { + "name": "myAspNetWebAppPipeline-project" + }, + "bootstrapConfiguration": { + "template": { + "id": "ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp", + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroup": "myAspNetWebAppPipeline-rg", + "webAppName": "myAspNetWebApp", + "location": "South India", + "appServicePlan": "S1 Standard", + "appInsightLocation": "South India", + "azureAuth": null + } + } + } + } + } + } + } +} diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesByResourceGroup.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesByResourceGroup.json new file mode 100644 index 000000000000..e6b20a3bc65c --- /dev/null +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesByResourceGroup.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "myAspNetWebAppPipeline-rg", + "api-version": "2019-07-01-preview" + }, + "responses": { + "200": { + "description": "The Azure Pipelines has been fetched successfully.", + "body": { + "value": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", + "name": "myAspNetWebAppPipeline", + "type": "Microsoft.DevOps/pipelines", + "location": "South India", + "properties": { + "organization": { + "name": "myAspNetWebAppPipeline-org" + }, + "project": { + "name": "myAspNetWebAppPipeline-project" + }, + "bootstrapConfiguration": { + "template": { + "id": "ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp", + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroup": "myAspNetWebAppPipeline-rg", + "webAppName": "myAspNetWebApp", + "location": "South India", + "appServicePlan": "S1 Standard", + "appInsightLocation": "South India", + "azureAuth": null + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesBySubscription.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesBySubscription.json new file mode 100644 index 000000000000..f4efc388d643 --- /dev/null +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesBySubscription.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "api-version": "2019-07-01-preview" + }, + "responses": { + "200": { + "description": "The Azure Pipelines have been fetched successfully.", + "body": { + "value": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", + "name": "myAspNetWebAppPipeline", + "type": "Microsoft.DevOps/pipelines", + "location": "South India", + "properties": { + "organization": { + "name": "myAspNetWebAppPipeline-org" + }, + "project": { + "name": "myAspNetWebAppPipeline-project" + }, + "bootstrapConfiguration": { + "template": { + "id": "ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp", + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroup": "myAspNetWebAppPipeline-rg", + "webAppName": "myAspNetWebApp", + "location": "South India", + "appServicePlan": "S1 Standard", + "appInsightLocation": "South India", + "azureAuth": null + } + } + } + } + }, + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg1/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline1", + "name": "myAspNetWebAppPipeline1", + "type": "Microsoft.DevOps/pipelines", + "location": "South India", + "properties": { + "organization": { + "name": "myAspNetWebAppPipeline-org1" + }, + "project": { + "name": "myAspNetWebAppPipeline-project1" + }, + "bootstrapConfiguration": { + "template": { + "id": "ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp", + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroup": "myAspNetWebAppPipeline-rg", + "webAppName": "myAspNetWebApp", + "location": "South India", + "appServicePlan": "S1 Standard", + "appInsightLocation": "South India", + "azureAuth": null + } + } + } + } + } + ] + } + } + } +} diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListOperations.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListOperations.json new file mode 100644 index 000000000000..94b99e0ce784 --- /dev/null +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListOperations.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2019-07-01-preview" + }, + "responses": { + "200": { + "description": "The list of supported operations has been fetched successfully.", + "body": { + "value": [ + { + "name": "Microsoft.DevOps/register/action", + "isDataAction": "false", + "display": { + "provider": "Microsoft DevOps", + "resource": "register", + "operation": "Register for Microsoft.DevOps", + "description": "Registers the specified subscription with Microsoft.DevOps resource provider and enables the creation of Pipelines" + } + }, + { + "name": "Microsoft.DevOps/pipelines/write", + "isDataAction": "false", + "display": { + "provider": "Microsoft DevOps", + "resource": "Pipelines", + "operation": "Create or Update Pipeline", + "description": "Creates or Updates any Pipeline" + } + }, + { + "name": "Microsoft.DevOps/pipelines/read", + "isDataAction": "false", + "display": { + "provider": "Microsoft DevOps", + "resource": "Pipelines", + "operation": "Read Pipeline", + "description": "Reads any Pipeline" + } + }, + { + "name": "Microsoft.DevOps/pipelines/delete", + "isDataAction": "false", + "display": { + "provider": "Microsoft DevOps", + "resource": "Pipelines", + "operation": "Delete Pipeline", + "description": "Deletes any Pipeline" + } + }, + { + "name": "Microsoft.DevOps/pipelineTemplateDefinitions/read", + "isDataAction": "false", + "display": { + "provider": "Microsoft DevOps", + "resource": "PipelineTemplateDefinitions", + "operation": "Read PipelineTemplateDefinition", + "description": "Reads any PipelineTemplateDefinition" + } + } + ] + } + } + } +} diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelineTemplateDefinitions.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelineTemplateDefinitions.json new file mode 100644 index 000000000000..75e8bfc6863f --- /dev/null +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelineTemplateDefinitions.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "api-version": "2019-07-01-preview" + }, + "responses": { + "200": { + "description": "The pipeline template definitions have been fetched successfully.", + "body": { + "value": [ + { + "id": "ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp", + "description": "Template for configuring CI/CD pipeline for ASP.Net app on Azure windows app service", + "inputs": [ + { + "id": "azureAuth", + "description": "Authorization for Azure ARM endpoints.", + "type": "String", + "possibleValues": [] + }, + { + "id": "subscriptionId", + "description": "Id of subscription where azure resources will be created.", + "type": "String", + "possibleValues": [] + }, + { + "id": "resourceGroup", + "description": "A resource group is a collection of resources that share the same lifecycle, permissions, and policies. Name of resource group which should contain web app.", + "type": "String", + "possibleValues": [] + }, + { + "id": "webAppName", + "description": "Name of web app to be created", + "type": "String", + "possibleValues": [] + }, + { + "id": "location", + "description": "Choose the Azure region that's right for you and your customers.", + "type": "String", + "possibleValues": [] + }, + { + "id": "appServicePlan", + "description": "Details of cost and compute resource associated with the web app", + "type": "String", + "possibleValues": [ + { + "value": "P1 Premium", + "displayValue": "P1 Premium (1 Core, 1.75 GB RAM)" + }, + { + "value": "P2 Premium", + "displayValue": "P2 Premium (2 Core, 3.5 GB RAM)" + }, + { + "value": "P3 Premium", + "displayValue": "P3 Premium (4 Core, 7 GB RAM)" + }, + { + "value": "S1 Standard", + "displayValue": "S1 Standard (1 Core, 1.75 GB RAM)" + }, + { + "value": "S2 Standard", + "displayValue": "S2 Standard (2 Core, 3.5 GB RAM)" + }, + { + "value": "S3 Standard", + "displayValue": "S3 Standard (4 Core, 7 GB RAM)" + }, + { + "value": "B1 Basic", + "displayValue": "B1 Basic (1 Core, 1.75 GB RAM)" + }, + { + "value": "B2 Basic", + "displayValue": "B2 Basic (2 Core, 3.5 GB RAM)" + }, + { + "value": "B3 Basic", + "displayValue": "B3 Basic (4 Core, 7 GB RAM)" + }, + { + "value": "F1 Free", + "displayValue": "F1 Free" + }, + { + "value": "D1 Shared", + "displayValue": "D1 Shared" + } + ] + }, + { + "id": "appInsightLocation", + "description": "Collect application monitoring data using Application Insights.", + "type": "String", + "possibleValues": [] + } + ] + } + ] + } + } + } +} diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/UpdateAzurePipeline.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/UpdateAzurePipeline.json new file mode 100644 index 000000000000..e43c73c93596 --- /dev/null +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/UpdateAzurePipeline.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "myAspNetWebAppPipeline-rg", + "pipelineName": "myAspNetWebAppPipeline", + "api-version": "2019-07-01-preview", + "updateOperationParameters": { + "tags": { + "tagKey": "tagvalue" + } + } + }, + "responses": { + "200": { + "description": "The Azure Pipeline has been updated successfully.", + "body": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", + "name": "myAspNetWebAppPipeline", + "type": "Microsoft.DevOps/pipelines", + "location": "South India", + "tags": { + "tagKey": "tagvalue" + }, + "properties": { + "organization": { + "name": "myAspNetWebAppPipeline-org" + }, + "project": { + "name": "myAspNetWebAppPipeline-project" + }, + "bootstrapConfiguration": { + "template": { + "id": "ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp", + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroup": "myAspNetWebAppPipeline-rg", + "webAppName": "myAspNetWebApp", + "location": "South India", + "appServicePlan": "S1 Standard", + "appInsightLocation": "South India", + "azureAuth": null + } + } + } + } + } + } + } +} From 0e3888663995ddcf2a83f45727b2342b0226d4c4 Mon Sep 17 00:00:00 2001 From: Suyash Saluja Date: Mon, 9 Nov 2020 17:16:42 +0530 Subject: [PATCH 02/11] Actual changes to api spec for new version --- .../preview/2020-07-13-preview/devops.json | 132 ++++++++++++------ ...ePipeline-Sample-AspNet-WindowsWebApp.json | 6 +- ...bPipeline-Sample-AspNet-WindowsWebApp.json | 80 +++++++++++ ...AzurePipeline.json => DeletePipeline.json} | 6 +- ...GetAzurePipeline.json => GetPipeline.json} | 5 +- .../examples/ListOperations.json | 2 +- .../ListPipelineTemplateDefinitions.json | 2 +- ...json => ListPipelinesByResourceGroup.json} | 5 +- ....json => ListPipelinesBySubscription.json} | 6 +- .../examples/UpdateAzurePipeline.json | 3 +- .../readme.azureresourceschema.md | 12 ++ .../devops/resource-manager/readme.go.md | 10 ++ .../devops/resource-manager/readme.md | 9 ++ .../devops/resource-manager/readme.python.md | 2 +- .../devops/resource-manager/readme.ruby.md | 20 ++- 15 files changed, 243 insertions(+), 57 deletions(-) create mode 100644 specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json rename specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/{DeleteAzurePipeline.json => DeletePipeline.json} (53%) rename specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/{GetAzurePipeline.json => GetPipeline.json} (89%) rename specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/{ListAzurePipelinesByResourceGroup.json => ListPipelinesByResourceGroup.json} (89%) rename specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/{ListAzurePipelinesBySubscription.json => ListPipelinesBySubscription.json} (92%) diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json index 45b65c921dd3..e8d2729737c1 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json @@ -3,7 +3,7 @@ "info": { "title": "Azure DevOps", "description": "Azure DevOps Resource Provider", - "version": "2019-07-01-preview", + "version": "2020-07-13-preview", "x-ms-code-generation-settings": { "name": "DevOpsClient" } @@ -79,7 +79,7 @@ "PipelineTemplateDefinitions" ], "operationId": "PipelineTemplateDefinitions_List", - "description": "Lists all pipeline templates which can be used to configure an Azure Pipeline.", + "description": "Lists all pipeline templates which can be used to configure a Pipeline.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" @@ -115,7 +115,7 @@ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevOps/pipelines/{pipelineName}": { "put": { "operationId": "Pipelines_CreateOrUpdate", - "description": "Creates or updates an Azure Pipeline.", + "description": "Creates or updates a Pipeline.", "tags": [ "Pipelines" ], @@ -131,7 +131,7 @@ }, { "name": "pipelineName", - "description": "The name of the Azure Pipeline resource in ARM.", + "description": "The name of the Pipeline resource in ARM.", "in": "path", "type": "string", "required": true, @@ -139,7 +139,7 @@ }, { "name": "createOperationParameters", - "description": "The request payload to create the Azure Pipeline.", + "description": "The request payload to create the Pipeline.", "in": "body", "required": true, "schema": { @@ -149,10 +149,10 @@ ], "responses": { "202": { - "description": "The request has been accepted for processing and the Azure Pipeline will be configured asynchronously." + "description": "The request has been accepted for processing and the Pipeline will be configured asynchronously." }, "200": { - "description": "The Azure Pipeline has been configured successfully.", + "description": "The Pipeline has been configured successfully.", "schema": { "$ref": "#/definitions/Pipeline" } @@ -168,12 +168,15 @@ "x-ms-examples": { "Create an Azure pipeline to deploy a sample ASP.Net application to Azure web-app": { "$ref": "./examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json" + }, + "Create a GitHub pipeline to deploy a sample ASP.Net application to Azure web-app": { + "$ref": "./examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json" } } }, "get": { "operationId": "Pipelines_Get", - "description": "Gets an existing Azure Pipeline.", + "description": "Gets an existing Pipeline.", "tags": [ "Pipelines" ], @@ -189,7 +192,7 @@ }, { "name": "pipelineName", - "description": "The name of the Azure Pipeline resource in ARM.", + "description": "The name of the Pipeline resource in ARM.", "in": "path", "type": "string", "required": true, @@ -198,7 +201,7 @@ ], "responses": { "200": { - "description": "The Azure Pipeline has been fetched successfully.", + "description": "The Pipeline has been fetched successfully.", "schema": { "$ref": "#/definitions/Pipeline" } @@ -211,14 +214,14 @@ } }, "x-ms-examples": { - "Get an existing Azure pipeline": { - "$ref": "./examples/GetAzurePipeline.json" + "Get an existing pipeline": { + "$ref": "./examples/GetPipeline.json" } } }, "patch": { "operationId": "Pipelines_Update", - "description": "Updates the properties of an Azure Pipeline. Currently, only tags can be updated.", + "description": "Updates the properties of an Azure Pipeline. Currently, it is not supported on 'githubWorkflow' pipeline type and only tags can be updated for 'azurePipeline' pipeline type.", "tags": [ "Pipelines" ], @@ -265,14 +268,14 @@ } }, "x-ms-examples": { - "Get an existing Azure pipeline": { + "Update an existing Azure pipeline": { "$ref": "./examples/UpdateAzurePipeline.json" } } }, "delete": { "operationId": "Pipelines_Delete", - "description": "Deletes an Azure Pipeline.", + "description": "Deletes a Pipeline.", "tags": [ "Pipelines" ], @@ -288,7 +291,7 @@ }, { "name": "pipelineName", - "description": "The name of the Azure Pipeline resource.", + "description": "The name of the Pipeline resource.", "in": "path", "type": "string", "required": true, @@ -297,10 +300,10 @@ ], "responses": { "200": { - "description": "The Azure Pipeline has been deleted successfully." + "description": "The Pipeline has been deleted successfully." }, "204": { - "description": "The Azure Pipeline is not found or has been deleted already." + "description": "The Pipeline is not found or has been deleted already." }, "default": { "description": "Error response describing why the operation failed.", @@ -310,8 +313,8 @@ } }, "x-ms-examples": { - "Get an existing Azure pipeline": { - "$ref": "./examples/DeleteAzurePipeline.json" + "Delete an existing pipeline": { + "$ref": "./examples/DeletePipeline.json" } } } @@ -319,7 +322,7 @@ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevOps/pipelines": { "get": { "operationId": "Pipelines_ListByResourceGroup", - "description": "Lists all Azure Pipelines under the specified resource group.", + "description": "Lists all Pipelines under the specified resource group.", "tags": [ "Pipelines" ], @@ -336,7 +339,7 @@ ], "responses": { "200": { - "description": "The Azure Pipelines have been fetched successfully.", + "description": "The Pipelines have been fetched successfully.", "schema": { "$ref": "#/definitions/PipelineListResult" } @@ -352,8 +355,8 @@ "nextLinkName": "nextLink" }, "x-ms-examples": { - "List all Azure Pipelines under the specified resource group": { - "$ref": "./examples/ListAzurePipelinesByResourceGroup.json" + "List all Pipelines under the specified resource group": { + "$ref": "./examples/ListPipelinesByResourceGroup.json" } } } @@ -361,7 +364,7 @@ "/subscriptions/{subscriptionId}/providers/Microsoft.DevOps/pipelines": { "get": { "operationId": "Pipelines_ListBySubscription", - "description": "Lists all Azure Pipelines under the specified subscription.", + "description": "Lists all Pipelines under the specified subscription.", "tags": [ "Pipelines" ], @@ -375,7 +378,7 @@ ], "responses": { "200": { - "description": "The Azure Pipelines have been fetched successfully.", + "description": "The Pipelines have been fetched successfully.", "schema": { "$ref": "#/definitions/PipelineListResult" } @@ -391,8 +394,8 @@ "nextLinkName": "nextLink" }, "x-ms-examples": { - "List all Azure pipelines under the specified subscription": { - "$ref": "./examples/ListAzurePipelinesBySubscription.json" + "List all pipelines under the specified subscription": { + "$ref": "./examples/ListPipelinesBySubscription.json" } } } @@ -592,7 +595,7 @@ }, "Pipeline": { "type": "object", - "description": "Azure DevOps Pipeline used to configure Continuous Integration (CI) & Continuous Delivery (CD) for Azure resources.", + "description": "Pipeline used to configure Continuous Integration (CI) & Continuous Delivery (CD) for Azure resources.", "properties": { "properties": { "$ref": "#/definitions/PipelineProperties", @@ -612,29 +615,76 @@ "PipelineProperties": { "type": "object", "description": "Custom properties of a Pipeline.", + "discriminator": "pipelineType", "properties": { "pipelineId": { "type": "integer", "readOnly": true, - "description": "Unique identifier of the Azure Pipeline within the Azure DevOps Project." + "description": "Unique identifier of the Pipeline" }, + "pipelineType": { + "type": "string", + "enum": [ + "githubWorkflow", + "azurePipeline" + ], + "x-ms-enum": { + "name": "pipelineTypeEnum", + "modelAsString": true + }, + "description": "Specifies which CI/CD provider to use. Valid options are 'azurePipeline', 'githubWorkflow'." + }, + "bootstrapConfiguration": { + "$ref": "#/definitions/BootstrapConfiguration", + "description": "Configuration used to bootstrap the Pipeline." + } + }, + "required": [ + "pipelineType", + "bootstrapConfiguration" + ] + }, + "azurePipelineProperties": { + "type": "object", + "x-ms-discriminator-value": "azurePipeline", + "description": "Custom properties of a Azure Pipeline.", + "properties": { "organization": { "$ref": "#/definitions/OrganizationReference", - "description": "Reference to the Azure DevOps Organization containing the Pipeline." + "description": "Reference to the Azure DevOps Organization containing the Pipeline. Required for 'azurePipeline' pipeline type." }, "project": { "$ref": "#/definitions/ProjectReference", - "description": "Reference to the Azure DevOps Project containing the Pipeline." - }, - "bootstrapConfiguration": { - "$ref": "#/definitions/BootstrapConfiguration", - "description": "Configuration used to bootstrap the Pipeline." + "description": "Reference to the Azure DevOps Project containing the Pipeline. Required for 'azurePipeline' pipeline type." } }, + "allOf": [ + { + "$ref": "#/definitions/PipelineProperties" + } + ], "required": [ "organization", - "project", - "bootstrapConfiguration" + "project" + ] + }, + "githubWorkflowProperties": { + "type": "object", + "x-ms-discriminator-value": "githubWorkflow", + "description": "Custom properties of an Github Pipeline.", + "properties": { + "repository": { + "$ref": "#/definitions/CodeRepository", + "description": "Contains the specifications of the repository to be created for generating the workflow. Required for 'githubWorkflow' pipeline type." + } + }, + "allOf": [ + { + "$ref": "#/definitions/PipelineProperties" + } + ], + "required": [ + "repository" ] }, "OrganizationReference": { @@ -677,9 +727,9 @@ "type": "object", "description": "Configuration used to bootstrap a Pipeline.", "properties": { - "repository": { + "sourceRepository": { "$ref": "#/definitions/CodeRepository", - "description": "Repository containing the source code for the pipeline." + "description": "Repository containing the source code for the pipeline. Currently only 'azurePipeline' pipeline type supports this." }, "template": { "$ref": "#/definitions/PipelineTemplate", @@ -827,7 +877,7 @@ } }, "PipelineListResult": { - "description": "Result of a request to list all Azure Pipelines under a given scope.", + "description": "Result of a request to list all Pipelines under a given scope.", "properties": { "value": { "description": "List of pipelines.", diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json index 0a6934d91396..184ceba7213f 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json @@ -3,11 +3,12 @@ "subscriptionId": "{subscriptionId}", "resourceGroupName": "myAspNetWebAppPipeline-rg", "pipelineName": "myAspNetWebAppPipeline", - "api-version": "2019-07-01-preview", + "api-version": "2020-07-13-preview", "createOperationParameters": { "location": "South India", "tags": {}, "properties": { + "pipelineType": "azurePipeline", "organization": { "name": "myAspNetWebAppPipeline-org" }, @@ -40,13 +41,14 @@ } }, "200": { - "description": "The Azure Pipeline has been configured successfully.", + "description": "The Pipeline has been configured successfully.", "body": { "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", "name": "myAspNetWebAppPipeline", "type": "Microsoft.DevOps/pipelines", "location": "South India", "properties": { + "pipelineType": "azurePipeline", "organization": { "name": "myAspNetWebAppPipeline-org" }, diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json new file mode 100644 index 000000000000..037c24ba4868 --- /dev/null +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "myAspNetWebAppPipeline-rg", + "pipelineName": "myAspNetWebAppPipeline", + "api-version": "2020-07-13-preview", + "createOperationParameters": { + "location": "South India", + "tags": {}, + "properties": { + "pipelineType": "githubWorkflow", + "repository": { + "repositoryType": "gitHub", + "id": "contoso/myAspNetWebAppPipeline-org", + "defaultBranch": "master", + "authorization": { + "authorizationType": "personalAccessToken", + "parameters": { + "token": "mypat" + } + } + }, + "bootstrapConfiguration": { + "template": { + "id": "ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp", + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroup": "myAspNetWebAppPipeline-rg", + "webAppName": "myAspNetWebApp", + "location": "South India", + "appServicePlan": "S1 Standard", + "appInsightLocation": "South India", + "azureAuth": "{\"scheme\":\"ServicePrincipal\",\"parameters\":{\"tenantid\":\"{subscriptionTenantId}\",\"objectid\":\"{appObjectId}\",\"serviceprincipalid\":\"{appId}\",\"serviceprincipalkey\":\"{appSecret}\"}}" + } + } + } + } + } + }, + "responses": { + "202": { + "description": "The request has been accepted for processing and the Azure Pipeline will be configured asynchronously.", + "headers": { + "location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline/operations/{operationId}", + "retry-after": "5" + } + }, + "200": { + "description": "The Pipeline has been configured successfully.", + "body": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", + "name": "myAspNetWebAppPipeline", + "type": "Microsoft.DevOps/pipelines", + "location": "South India", + "properties": { + "pipelineType": "githubWorkflow", + "repository": { + "repositoryType": "gitHub", + "id": "contoso/myAspNetWebAppPipeline-org", + "defaultBranch": "master" + }, + "bootstrapConfiguration": { + "template": { + "id": "ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp", + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroup": "myAspNetWebAppPipeline-rg", + "webAppName": "myAspNetWebApp", + "location": "South India", + "appServicePlan": "S1 Standard", + "appInsightLocation": "South India", + "azureAuth": null + } + } + } + } + } + } + } +} diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/DeleteAzurePipeline.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/DeletePipeline.json similarity index 53% rename from specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/DeleteAzurePipeline.json rename to specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/DeletePipeline.json index 87a96b97812a..06ce8c762e7f 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/DeleteAzurePipeline.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/DeletePipeline.json @@ -3,14 +3,14 @@ "subscriptionId": "{subscriptionId}", "resourceGroupName": "myAspNetWebAppPipeline-rg", "pipelineName": "myAspNetWebAppPipeline", - "api-version": "2019-07-01-preview" + "api-version": "2020-07-13-preview" }, "responses": { "200": { - "description": "The Azure Pipeline has been deleted successfully." + "description": "The Pipeline has been deleted successfully." }, "204": { - "description": "The Azure Pipeline is not found or has been deleted already." + "description": "The Pipeline is not found or has been deleted already." } } } diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetAzurePipeline.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetPipeline.json similarity index 89% rename from specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetAzurePipeline.json rename to specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetPipeline.json index e76aa49aeca0..af7163dbafc8 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetAzurePipeline.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetPipeline.json @@ -3,17 +3,18 @@ "subscriptionId": "{subscriptionId}", "resourceGroupName": "myAspNetWebAppPipeline-rg", "pipelineName": "myAspNetWebAppPipeline", - "api-version": "2019-07-01-preview" + "api-version": "2020-07-13-preview" }, "responses": { "200": { - "description": "The Azure Pipeline has been configured successfully.", + "description": "The Pipeline has been configured successfully.", "body": { "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", "name": "myAspNetWebAppPipeline", "type": "Microsoft.DevOps/pipelines", "location": "South India", "properties": { + "pipelineType": "azurePipeline", "organization": { "name": "myAspNetWebAppPipeline-org" }, diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListOperations.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListOperations.json index 94b99e0ce784..069122a9a7be 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListOperations.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListOperations.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-07-01-preview" + "api-version": "2020-07-13-preview" }, "responses": { "200": { diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelineTemplateDefinitions.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelineTemplateDefinitions.json index 75e8bfc6863f..1796dde31e47 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelineTemplateDefinitions.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelineTemplateDefinitions.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-07-01-preview" + "api-version": "2020-07-13-preview" }, "responses": { "200": { diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesByResourceGroup.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesByResourceGroup.json similarity index 89% rename from specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesByResourceGroup.json rename to specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesByResourceGroup.json index e6b20a3bc65c..0cdeaedfdf8b 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesByResourceGroup.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesByResourceGroup.json @@ -2,11 +2,11 @@ "parameters": { "subscriptionId": "{subscriptionId}", "resourceGroupName": "myAspNetWebAppPipeline-rg", - "api-version": "2019-07-01-preview" + "api-version": "2020-07-13-preview" }, "responses": { "200": { - "description": "The Azure Pipelines has been fetched successfully.", + "description": "The Pipelines has been fetched successfully.", "body": { "value": [ { @@ -15,6 +15,7 @@ "type": "Microsoft.DevOps/pipelines", "location": "South India", "properties": { + "pipelineType": "azurePipeline", "organization": { "name": "myAspNetWebAppPipeline-org" }, diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesBySubscription.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesBySubscription.json similarity index 92% rename from specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesBySubscription.json rename to specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesBySubscription.json index f4efc388d643..9e6e9309e29b 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListAzurePipelinesBySubscription.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesBySubscription.json @@ -1,11 +1,11 @@ { "parameters": { "subscriptionId": "{subscriptionId}", - "api-version": "2019-07-01-preview" + "api-version": "2020-07-13-preview" }, "responses": { "200": { - "description": "The Azure Pipelines have been fetched successfully.", + "description": "The Pipelines have been fetched successfully.", "body": { "value": [ { @@ -14,6 +14,7 @@ "type": "Microsoft.DevOps/pipelines", "location": "South India", "properties": { + "pipelineType": "azurePipeline", "organization": { "name": "myAspNetWebAppPipeline-org" }, @@ -42,6 +43,7 @@ "type": "Microsoft.DevOps/pipelines", "location": "South India", "properties": { + "pipelineType": "azurePipeline", "organization": { "name": "myAspNetWebAppPipeline-org1" }, diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/UpdateAzurePipeline.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/UpdateAzurePipeline.json index e43c73c93596..0a25144e2583 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/UpdateAzurePipeline.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/UpdateAzurePipeline.json @@ -3,7 +3,7 @@ "subscriptionId": "{subscriptionId}", "resourceGroupName": "myAspNetWebAppPipeline-rg", "pipelineName": "myAspNetWebAppPipeline", - "api-version": "2019-07-01-preview", + "api-version": "2020-07-13-preview", "updateOperationParameters": { "tags": { "tagKey": "tagvalue" @@ -22,6 +22,7 @@ "tagKey": "tagvalue" }, "properties": { + "pipelineType": "azurePipeline", "organization": { "name": "myAspNetWebAppPipeline-org" }, diff --git a/specification/devops/resource-manager/readme.azureresourceschema.md b/specification/devops/resource-manager/readme.azureresourceschema.md index f9ba7f8d1279..306aa14f7664 100644 --- a/specification/devops/resource-manager/readme.azureresourceschema.md +++ b/specification/devops/resource-manager/readme.azureresourceschema.md @@ -6,12 +6,24 @@ These settings apply only when `--azureresourceschema` is specified on the comma ``` yaml $(azureresourceschema) && $(multiapi) batch: + - tag: schema-devops-2020-07-13-preview - tag: schema-devops-2019-07-01-preview ``` Please also specify `--azureresourceschema-folder=`. +### Tag: schema-devops-2020-07-13-preview and azureresourceschema + +``` yaml $(tag) == 'schema-devops-2020-07-13-preview' && $(azureresourceschema) +output-folder: $(azureresourceschema-folder)/schemas + +# all the input files in this apiVersion +input-file: + - Microsoft.DevOps/preview/2020-07-13-preview/devops.json + +``` + ### Tag: schema-devops-2019-07-01-preview and azureresourceschema ``` yaml $(tag) == 'schema-devops-2019-07-01-preview' && $(azureresourceschema) diff --git a/specification/devops/resource-manager/readme.go.md b/specification/devops/resource-manager/readme.go.md index 70edb4ea11ce..b58fcf33e7d4 100644 --- a/specification/devops/resource-manager/readme.go.md +++ b/specification/devops/resource-manager/readme.go.md @@ -13,11 +13,21 @@ go: ``` yaml $(go) && $(multiapi) batch: + - tag: package-2020-07-13-preview - tag: package-2019-07-01-preview ``` ### Tag: package-2019-07-01-preview and go +These settings apply only when `--tag=package-2020-07-13-preview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +```yaml $(tag) == 'package-2020-07-13-preview' && $(go) +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2020-07-13-preview/$(namespace) +``` + +### Tag: package-2019-07-01-preview and go + These settings apply only when `--tag=package-2019-07-01-preview --go` is specified on the command line. Please also specify `--go-sdk-folder=`. diff --git a/specification/devops/resource-manager/readme.md b/specification/devops/resource-manager/readme.md index cc8c568e45df..4ee71522435b 100644 --- a/specification/devops/resource-manager/readme.md +++ b/specification/devops/resource-manager/readme.md @@ -29,6 +29,15 @@ openapi-type: arm tag: package-2019-07-01-preview ``` +### Tag: package-2020-07-13-preview + +These settings apply only when `--tag=package-2020-07-13-preview` is specified on the command line. + +```yaml $(tag) == 'package-2020-07-13-preview' +input-file: + - Microsoft.DevOps/preview/2020-07-13-preview/devops.json +``` + ### Tag: package-2019-07-01-preview These settings apply only when `--tag=package-2019-07-01-preview` is specified on the command line. diff --git a/specification/devops/resource-manager/readme.python.md b/specification/devops/resource-manager/readme.python.md index d8329e41d90e..72a583c125c5 100644 --- a/specification/devops/resource-manager/readme.python.md +++ b/specification/devops/resource-manager/readme.python.md @@ -10,7 +10,7 @@ python: payload-flattening-threshold: 2 namespace: azure.mgmt.devops package-name: azure-mgmt-devops - package-version: 2019-07-01-preview + package-version: 2020-07-13-preview clear-output-folder: true ``` diff --git a/specification/devops/resource-manager/readme.ruby.md b/specification/devops/resource-manager/readme.ruby.md index 3522830affc4..2511e5de0d55 100644 --- a/specification/devops/resource-manager/readme.ruby.md +++ b/specification/devops/resource-manager/readme.ruby.md @@ -4,10 +4,28 @@ These settings apply only when `--ruby` is specified on the command line. ```yaml package-name: azure_mgmt_devops -package-version: 2019-07-01-preview +package-version: 2020-07-13-preview azure-arm: true ``` +### Ruby multi-api + +``` yaml $(ruby) && $(multiapi) +batch: + - tag: package-2020-07-13-preview + - tag: package-2019-07-01-preview +``` + +### Tag: package-2020-07-13-preview and ruby + +These settings apply only when `--tag=package-2020-07-13-preview --ruby` is specified on the command line. +Please also specify `--ruby-sdks-folder=`. + +```yaml $(tag) == 'package-2020-07-13-preview' && $(ruby) +namespace: Azure::DevOps::Mgmt::V2020_07_13_preview +output-folder: $(ruby-sdks-folder)/management/azure_mgmt_devops/lib +``` + ### Tag: package-2019-07-01-preview and ruby These settings apply only when `--tag=package-2019-07-01-preview --ruby` is specified on the command line. From 0744ddcd1138c38c5ec283cc268e9fa13d53eaee Mon Sep 17 00:00:00 2001 From: Suyash Saluja Date: Wed, 25 Nov 2020 17:46:20 +0530 Subject: [PATCH 03/11] Switching to multi-api build for python --- .../devops/resource-manager/readme.python.md | 42 +++++++++++++------ 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/specification/devops/resource-manager/readme.python.md b/specification/devops/resource-manager/readme.python.md index 72a583c125c5..6f09a2d89f0c 100644 --- a/specification/devops/resource-manager/readme.python.md +++ b/specification/devops/resource-manager/readme.python.md @@ -1,21 +1,37 @@ ## Python These settings apply only when `--python` is specified on the command line. + +```yaml +package-name: azure_mgmt_devops +package-version: 2020-07-13-preview +azure-arm: true +``` + +### Python multi-api + +``` yaml $(python) && $(multiapi) +batch: + - tag: package-2020-07-13-preview + - tag: package-2019-07-01-preview +``` + +### Tag: package-2020-07-13-preview and python + +These settings apply only when `--tag=package-2020-07-13-preview --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -```yaml $(python) -python: - azure-arm: true - license-header: MICROSOFT_MIT_NO_VERSION - payload-flattening-threshold: 2 - namespace: azure.mgmt.devops - package-name: azure-mgmt-devops - package-version: 2020-07-13-preview - clear-output-folder: true +```yaml $(tag) == 'package-2020-07-13-preview' && $(python) +namespace: Azure::DevOps::Mgmt::V2020_07_13_preview +output-folder: $(python-sdks-folder)/management/azure_mgmt_devops/lib ``` -```yaml $(python) -python: - no-namespace-folders: true - output-folder: $(python-sdks-folder)/devops/azure-mgmt-devops/azure/mgmt/devops +### Tag: package-2019-07-01-preview and python + +These settings apply only when `--tag=package-2019-07-01-preview --python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +```yaml $(tag) == 'package-2019-07-01-preview' && $(python) +namespace: Azure::DevOps::Mgmt::V2019_07_01_preview +output-folder: $(python-sdks-folder)/management/azure_mgmt_devops/lib ``` From 4254658acdf868dc5c29baf5cf296c30eebaaaca Mon Sep 17 00:00:00 2001 From: Suyash Saluja Date: Wed, 25 Nov 2020 18:31:04 +0530 Subject: [PATCH 04/11] Fix python spec to correct namespaces in multiapi mode --- specification/devops/resource-manager/readme.python.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/devops/resource-manager/readme.python.md b/specification/devops/resource-manager/readme.python.md index 6f09a2d89f0c..07419f6a58ca 100644 --- a/specification/devops/resource-manager/readme.python.md +++ b/specification/devops/resource-manager/readme.python.md @@ -3,8 +3,9 @@ These settings apply only when `--python` is specified on the command line. ```yaml -package-name: azure_mgmt_devops +package-name: azure-mgmt-devops package-version: 2020-07-13-preview +namespace: azure.mgmt.devops azure-arm: true ``` @@ -22,8 +23,7 @@ These settings apply only when `--tag=package-2020-07-13-preview --python` is sp Please also specify `--python-sdks-folder=`. ```yaml $(tag) == 'package-2020-07-13-preview' && $(python) -namespace: Azure::DevOps::Mgmt::V2020_07_13_preview -output-folder: $(python-sdks-folder)/management/azure_mgmt_devops/lib +output-folder: $(python-sdks-folder)/devops/azure-mgmt-devops/azure/mgmt/devops ``` ### Tag: package-2019-07-01-preview and python @@ -32,6 +32,6 @@ These settings apply only when `--tag=package-2019-07-01-preview --python` is sp Please also specify `--python-sdks-folder=`. ```yaml $(tag) == 'package-2019-07-01-preview' && $(python) -namespace: Azure::DevOps::Mgmt::V2019_07_01_preview -output-folder: $(python-sdks-folder)/management/azure_mgmt_devops/lib +namespace: azure.mgmt.devops +output-folder: $(python-sdks-folder)//devops/azure-mgmt-devops/azure/mgmt/devops ``` From 0de97f7d7ff6ed1d0174f924bc46f57ed856b967 Mon Sep 17 00:00:00 2001 From: Suyash Saluja Date: Wed, 25 Nov 2020 18:50:52 +0530 Subject: [PATCH 05/11] Revert changes to python generation --- .../devops/resource-manager/readme.python.md | 42 ++++++------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/specification/devops/resource-manager/readme.python.md b/specification/devops/resource-manager/readme.python.md index 07419f6a58ca..72a583c125c5 100644 --- a/specification/devops/resource-manager/readme.python.md +++ b/specification/devops/resource-manager/readme.python.md @@ -1,37 +1,21 @@ ## Python These settings apply only when `--python` is specified on the command line. - -```yaml -package-name: azure-mgmt-devops -package-version: 2020-07-13-preview -namespace: azure.mgmt.devops -azure-arm: true -``` - -### Python multi-api - -``` yaml $(python) && $(multiapi) -batch: - - tag: package-2020-07-13-preview - - tag: package-2019-07-01-preview -``` - -### Tag: package-2020-07-13-preview and python - -These settings apply only when `--tag=package-2020-07-13-preview --python` is specified on the command line. Please also specify `--python-sdks-folder=`. -```yaml $(tag) == 'package-2020-07-13-preview' && $(python) -output-folder: $(python-sdks-folder)/devops/azure-mgmt-devops/azure/mgmt/devops +```yaml $(python) +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: azure.mgmt.devops + package-name: azure-mgmt-devops + package-version: 2020-07-13-preview + clear-output-folder: true ``` -### Tag: package-2019-07-01-preview and python - -These settings apply only when `--tag=package-2019-07-01-preview --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -```yaml $(tag) == 'package-2019-07-01-preview' && $(python) -namespace: azure.mgmt.devops -output-folder: $(python-sdks-folder)//devops/azure-mgmt-devops/azure/mgmt/devops +```yaml $(python) +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/devops/azure-mgmt-devops/azure/mgmt/devops ``` From 723bac225407262a6ac50d1284e6c248ceefc375 Mon Sep 17 00:00:00 2001 From: Suyash Saluja Date: Mon, 21 Dec 2020 15:29:40 +0530 Subject: [PATCH 06/11] Add systemdata --- .../Microsoft.DevOps/preview/2020-07-13-preview/devops.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json index e8d2729737c1..590d0e94518d 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json @@ -637,6 +637,9 @@ "bootstrapConfiguration": { "$ref": "#/definitions/BootstrapConfiguration", "description": "Configuration used to bootstrap the Pipeline." + }, + "systemData": { + "$ref": "v2/types.json#definitions/systemData" } }, "required": [ From 097e5a1f5d69b2d490794d7f8ee034d10d12c1a2 Mon Sep 17 00:00:00 2001 From: Suyash Saluja Date: Mon, 21 Dec 2020 15:35:07 +0530 Subject: [PATCH 07/11] Fix the path for sys data reference --- .../Microsoft.DevOps/preview/2020-07-13-preview/devops.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json index 590d0e94518d..ddad6e83dba7 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json @@ -639,7 +639,7 @@ "description": "Configuration used to bootstrap the Pipeline." }, "systemData": { - "$ref": "v2/types.json#definitions/systemData" + "$ref": "../../../../../common-types/resource-management/v2/types.json#definitions/systemData" } }, "required": [ From f14638f6a67a6b319deb46a3c56a58e5281519ba Mon Sep 17 00:00:00 2001 From: Suyash Saluja Date: Mon, 21 Dec 2020 15:45:32 +0530 Subject: [PATCH 08/11] Fix path once more --- .../Microsoft.DevOps/preview/2020-07-13-preview/devops.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json index ddad6e83dba7..3bb2b1409572 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json @@ -639,7 +639,7 @@ "description": "Configuration used to bootstrap the Pipeline." }, "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#definitions/systemData" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } }, "required": [ From bced2087980df39870cc7ba3408735d49a7b7cbf Mon Sep 17 00:00:00 2001 From: Suyash Saluja Date: Mon, 21 Dec 2020 15:52:22 +0530 Subject: [PATCH 09/11] remove additional properties after including systemdata --- .../CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json | 2 -- .../CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json | 2 -- .../preview/2020-07-13-preview/examples/GetPipeline.json | 1 - .../examples/ListPipelinesByResourceGroup.json | 1 - .../examples/ListPipelinesBySubscription.json | 1 - .../2020-07-13-preview/examples/UpdateAzurePipeline.json | 4 ---- 6 files changed, 11 deletions(-) diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json index 184ceba7213f..0082d7569dbe 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json @@ -5,8 +5,6 @@ "pipelineName": "myAspNetWebAppPipeline", "api-version": "2020-07-13-preview", "createOperationParameters": { - "location": "South India", - "tags": {}, "properties": { "pipelineType": "azurePipeline", "organization": { diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json index 037c24ba4868..2b07ac4f1166 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json @@ -5,8 +5,6 @@ "pipelineName": "myAspNetWebAppPipeline", "api-version": "2020-07-13-preview", "createOperationParameters": { - "location": "South India", - "tags": {}, "properties": { "pipelineType": "githubWorkflow", "repository": { diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetPipeline.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetPipeline.json index af7163dbafc8..fe471c07eba8 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetPipeline.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/GetPipeline.json @@ -12,7 +12,6 @@ "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", "name": "myAspNetWebAppPipeline", "type": "Microsoft.DevOps/pipelines", - "location": "South India", "properties": { "pipelineType": "azurePipeline", "organization": { diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesByResourceGroup.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesByResourceGroup.json index 0cdeaedfdf8b..78c8f67adbe7 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesByResourceGroup.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesByResourceGroup.json @@ -13,7 +13,6 @@ "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", "name": "myAspNetWebAppPipeline", "type": "Microsoft.DevOps/pipelines", - "location": "South India", "properties": { "pipelineType": "azurePipeline", "organization": { diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesBySubscription.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesBySubscription.json index 9e6e9309e29b..4113f18b1da1 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesBySubscription.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesBySubscription.json @@ -12,7 +12,6 @@ "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", "name": "myAspNetWebAppPipeline", "type": "Microsoft.DevOps/pipelines", - "location": "South India", "properties": { "pipelineType": "azurePipeline", "organization": { diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/UpdateAzurePipeline.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/UpdateAzurePipeline.json index 0a25144e2583..f288df90c799 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/UpdateAzurePipeline.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/UpdateAzurePipeline.json @@ -17,10 +17,6 @@ "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", "name": "myAspNetWebAppPipeline", "type": "Microsoft.DevOps/pipelines", - "location": "South India", - "tags": { - "tagKey": "tagvalue" - }, "properties": { "pipelineType": "azurePipeline", "organization": { From b61a5c1300bd8b2ccc7ee40c79b6a79cdf5a4f44 Mon Sep 17 00:00:00 2001 From: Suyash Saluja Date: Mon, 21 Dec 2020 16:06:22 +0530 Subject: [PATCH 10/11] Remove more addtional properties --- .../CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json | 1 - .../CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json | 1 - .../2020-07-13-preview/examples/ListPipelinesBySubscription.json | 1 - 3 files changed, 3 deletions(-) diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json index 0082d7569dbe..6d80ec42e208 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateAzurePipeline-Sample-AspNet-WindowsWebApp.json @@ -44,7 +44,6 @@ "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", "name": "myAspNetWebAppPipeline", "type": "Microsoft.DevOps/pipelines", - "location": "South India", "properties": { "pipelineType": "azurePipeline", "organization": { diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json index 2b07ac4f1166..9d7cad8ba81d 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/CreateGitHubPipeline-Sample-AspNet-WindowsWebApp.json @@ -49,7 +49,6 @@ "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline", "name": "myAspNetWebAppPipeline", "type": "Microsoft.DevOps/pipelines", - "location": "South India", "properties": { "pipelineType": "githubWorkflow", "repository": { diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesBySubscription.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesBySubscription.json index 4113f18b1da1..5fc8386eb81c 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesBySubscription.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/examples/ListPipelinesBySubscription.json @@ -40,7 +40,6 @@ "id": "/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg1/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline1", "name": "myAspNetWebAppPipeline1", "type": "Microsoft.DevOps/pipelines", - "location": "South India", "properties": { "pipelineType": "azurePipeline", "organization": { From 264e5a2ed11089ba4f1fc1ff35330078057d83ae Mon Sep 17 00:00:00 2001 From: Suyash Saluja Date: Wed, 23 Dec 2020 16:16:21 +0530 Subject: [PATCH 11/11] Move system data to root --- .../preview/2020-07-13-preview/devops.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json index 3bb2b1409572..50827cbc7642 100644 --- a/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json +++ b/specification/devops/resource-manager/Microsoft.DevOps/preview/2020-07-13-preview/devops.json @@ -601,6 +601,11 @@ "$ref": "#/definitions/PipelineProperties", "description": "Custom properties of the Pipeline.", "x-ms-client-flatten": true + }, + "systemData": { + "readOnly": true, + "description": "The system metadata pertaining to this resource.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } }, "allOf": [ @@ -637,9 +642,6 @@ "bootstrapConfiguration": { "$ref": "#/definitions/BootstrapConfiguration", "description": "Configuration used to bootstrap the Pipeline." - }, - "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } }, "required": [