From f3646c2d7d1003a9a6213ae38caa623f4712cb5b Mon Sep 17 00:00:00 2001 From: vinca Date: Wed, 27 Mar 2019 18:06:15 +0530 Subject: [PATCH] remove container input --- .../resources.resjson/en-US/resources.resjson | 1 - Tasks/AzureWebAppContainerV1/task.json | 16 ++-------------- Tasks/AzureWebAppContainerV1/task.loc.json | 13 +------------ Tasks/AzureWebAppContainerV1/taskparameters.ts | 14 ++++++-------- 4 files changed, 9 insertions(+), 35 deletions(-) diff --git a/Tasks/AzureWebAppContainerV1/Strings/resources.resjson/en-US/resources.resjson b/Tasks/AzureWebAppContainerV1/Strings/resources.resjson/en-US/resources.resjson index c6a999aebac1..1f4c6bcbb9fd 100644 --- a/Tasks/AzureWebAppContainerV1/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/AzureWebAppContainerV1/Strings/resources.resjson/en-US/resources.resjson @@ -6,7 +6,6 @@ "loc.group.displayName.ApplicationAndConfigurationSettings": "Application and Configuration Settings", "loc.input.label.azureSubscription": "Azure subscription", "loc.input.help.azureSubscription": "Select the Azure Resource Manager subscription for the deployment.", - "loc.input.label.osType": "App OS type", "loc.input.label.appName": "App name", "loc.input.help.appName": "Enter or Select the name of an existing Azure App Service. App services based on selected app type will only be listed.", "loc.input.label.deployToSlotOrASE": "Deploy to Slot or App Service Environment", diff --git a/Tasks/AzureWebAppContainerV1/task.json b/Tasks/AzureWebAppContainerV1/task.json index e55c1660edbe..2e8740b87137 100644 --- a/Tasks/AzureWebAppContainerV1/task.json +++ b/Tasks/AzureWebAppContainerV1/task.json @@ -19,7 +19,7 @@ "version": { "Major": 1, "Minor": 0, - "Patch": 6 + "Patch": 7 }, "minimumAgentVersion": "2.104.1", "groups": [ @@ -38,18 +38,6 @@ "required": true, "helpMarkDown": "Select the Azure Resource Manager subscription for the deployment." }, - { - "name": "osType", - "type": "pickList", - "label": "App OS type", - "defaultValue": "Linux", - "required": true, - "options": { - "Linux": "Linux", - "Windows": "Windows" - - } - }, { "name": "appName", "type": "pickList", @@ -143,7 +131,7 @@ { "target": "appName", "endpointId": "$(azureSubscription)", - "dataSourceName": "AzureWebAppContainerNamesByOSType", + "dataSourceName": "AzureWebAppContainerNames", "parameters": { "osType": "$(osType)" } diff --git a/Tasks/AzureWebAppContainerV1/task.loc.json b/Tasks/AzureWebAppContainerV1/task.loc.json index ac30ecb14eff..4548cf5eb555 100644 --- a/Tasks/AzureWebAppContainerV1/task.loc.json +++ b/Tasks/AzureWebAppContainerV1/task.loc.json @@ -38,17 +38,6 @@ "required": true, "helpMarkDown": "ms-resource:loc.input.help.azureSubscription" }, - { - "name": "osType", - "type": "pickList", - "label": "ms-resource:loc.input.label.osType", - "defaultValue": "Linux", - "required": true, - "options": { - "Linux": "Linux", - "Windows": "Windows" - } - }, { "name": "appName", "type": "pickList", @@ -142,7 +131,7 @@ { "target": "appName", "endpointId": "$(azureSubscription)", - "dataSourceName": "AzureWebAppContainerNamesByOSType", + "dataSourceName": "AzureWebAppContainerNames", "parameters": { "osType": "$(osType)" } diff --git a/Tasks/AzureWebAppContainerV1/taskparameters.ts b/Tasks/AzureWebAppContainerV1/taskparameters.ts index ef3da29cd26c..ce82e6568977 100644 --- a/Tasks/AzureWebAppContainerV1/taskparameters.ts +++ b/Tasks/AzureWebAppContainerV1/taskparameters.ts @@ -19,7 +19,6 @@ export class TaskParametersUtility { StartupCommand: tl.getInput('containerCommand', false), ConfigurationSettings: tl.getInput('configurationStrings', false), WebAppName: tl.getInput('appName', true), - OSType: tl.getInput('osType', false), DeployToSlotOrASEFlag: tl.getBoolInput('deployToSlotOrASE', false), ResourceGroupName: tl.getInput('resourceGroupName', false), SlotName:tl.getInput('slotName', false) @@ -40,22 +39,21 @@ export class TaskParametersUtility { } private static async getWebAppKind(taskParameters: TaskParameters): Promise { - var resourceGroupName = taskParameters.ResourceGroupName; - var osType = taskParameters.OSType; + let resourceGroupName: string = taskParameters.ResourceGroupName; + let osType: string; if (!resourceGroupName) { var appDetails = await AzureResourceFilterUtility.getAppDetails(taskParameters.azureEndpoint, taskParameters.WebAppName); resourceGroupName = appDetails["resourceGroupName"]; - if(!osType) { - osType = osTypeMap.get(appDetails["kind"]) ? osTypeMap.get(appDetails["kind"]) : appDetails["kind"]; - } + osType = osTypeMap.get(appDetails["kind"]) ? osTypeMap.get(appDetails["kind"]) : appDetails["kind"]; tl.debug(`Resource Group: ${resourceGroupName}`); } - else if(!osType) { + else { var appService = new AzureAppService(taskParameters.azureEndpoint, taskParameters.ResourceGroupName, taskParameters.WebAppName); var configSettings = await appService.get(true); osType = osTypeMap.get(configSettings.kind) ? osTypeMap.get(configSettings.kind) : configSettings.kind; } + return { resourceGroupName: resourceGroupName, osType: osType @@ -66,7 +64,7 @@ export class TaskParametersUtility { export interface TaskParameters { azureEndpoint?: AzureEndpoint; connectedServiceName: string; - OSType: string; + OSType?: string; WebAppName: string; AppSettings?: string; StartupCommand?: string;