Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "remove container input" #9951

Merged
merged 1 commit into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"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",
Expand Down
16 changes: 14 additions & 2 deletions Tasks/AzureWebAppContainerV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 7
"Patch": 6
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand All @@ -38,6 +38,18 @@
"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",
Expand Down Expand Up @@ -131,7 +143,7 @@
{
"target": "appName",
"endpointId": "$(azureSubscription)",
"dataSourceName": "AzureWebAppContainerNames",
"dataSourceName": "AzureWebAppContainerNamesByOSType",
"parameters": {
"osType": "$(osType)"
}
Expand Down
13 changes: 12 additions & 1 deletion Tasks/AzureWebAppContainerV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@
"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",
Expand Down Expand Up @@ -131,7 +142,7 @@
{
"target": "appName",
"endpointId": "$(azureSubscription)",
"dataSourceName": "AzureWebAppContainerNames",
"dataSourceName": "AzureWebAppContainerNamesByOSType",
"parameters": {
"osType": "$(osType)"
}
Expand Down
14 changes: 8 additions & 6 deletions Tasks/AzureWebAppContainerV1/taskparameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ 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)
Expand All @@ -39,21 +40,22 @@ export class TaskParametersUtility {
}

private static async getWebAppKind(taskParameters: TaskParameters): Promise<any> {
let resourceGroupName: string = taskParameters.ResourceGroupName;
let osType: string;
var resourceGroupName = taskParameters.ResourceGroupName;
var osType = taskParameters.OSType;
if (!resourceGroupName) {
var appDetails = await AzureResourceFilterUtility.getAppDetails(taskParameters.azureEndpoint, taskParameters.WebAppName);
resourceGroupName = appDetails["resourceGroupName"];
osType = osTypeMap.get(appDetails["kind"]) ? osTypeMap.get(appDetails["kind"]) : appDetails["kind"];
if(!osType) {
osType = osTypeMap.get(appDetails["kind"]) ? osTypeMap.get(appDetails["kind"]) : appDetails["kind"];
}

tl.debug(`Resource Group: ${resourceGroupName}`);
}
else {
else if(!osType) {
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
Expand All @@ -64,7 +66,7 @@ export class TaskParametersUtility {
export interface TaskParameters {
azureEndpoint?: AzureEndpoint;
connectedServiceName: string;
OSType?: string;
OSType: string;
WebAppName: string;
AppSettings?: string;
StartupCommand?: string;
Expand Down