Skip to content

Commit 8df54f7

Browse files
authored
Clear input if deploytoslot is disabled (#14455)
1 parent 6bdcd2e commit 8df54f7

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Tasks/AzureFunctionAppV1/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"author": "Microsoft Corporation",
1818
"version": {
1919
"Major": 1,
20-
"Minor": 182,
20+
"Minor": 184,
2121
"Patch": 0
2222
},
2323
"minimumAgentVersion": "2.104.1",

Tasks/AzureFunctionAppV1/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"author": "Microsoft Corporation",
1818
"version": {
1919
"Major": 1,
20-
"Minor": 182,
20+
"Minor": 184,
2121
"Patch": 0
2222
},
2323
"minimumAgentVersion": "2.104.1",

Tasks/AzureFunctionAppV1/taskparameters.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ export class TaskParametersUtility {
2525
AppSettings: tl.getInput('appSettings', false),
2626
StartupCommand: tl.getInput('startUpCommand', false),
2727
ConfigurationSettings: tl.getInput('configurationStrings', false),
28-
ResourceGroupName: tl.getInput('resourceGroupName', false),
29-
SlotName: tl.getInput('slotName', false),
3028
WebAppName: tl.getInput('appName', true)
3129
}
3230

31+
//Clear input if deploytoslot is disabled
32+
taskParameters.ResourceGroupName = (!!taskParameters.DeployToSlotOrASEFlag) ? tl.getInput('resourceGroupName', false) : null;
33+
taskParameters.SlotName = (!!taskParameters.DeployToSlotOrASEFlag) ? tl.getInput('slotName', false) : "production";
34+
tl.debug(`SlotName : ${taskParameters.SlotName}`);
35+
3336
taskParameters.azureEndpoint = await new AzureRMEndpoint(taskParameters.connectedServiceName).getEndpoint();
3437
console.log(tl.loc('GotconnectiondetailsforazureRMWebApp0', taskParameters.WebAppName));
3538

0 commit comments

Comments
 (0)