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

Changes for slotname #11823

Merged
merged 10 commits into from
Nov 28, 2019
5 changes: 5 additions & 0 deletions Tasks/AzureAppServiceManageV0/azureappservicemanage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const webAppKindMap = new Map([
[ 'app,linux', 'webAppLinux' ],
[ 'app,container', 'webAppContainer']
]);
const defaultslotname:string = "production";

async function advancedSlotSwap(updateDeploymentStatus: boolean, appServiceSourceSlot: AzureAppService, appServiceTargetSlot: AzureAppService, appServiceSourceSlotUtils: AzureAppServiceUtils, appServiceTargetSlotUtils: AzureAppServiceUtils) {

Expand Down Expand Up @@ -86,6 +87,10 @@ async function run() {
}

tl.debug(`Resource Group: ${resourceGroupName}`);

let slotNameNotNeeded: boolean = (action == "Complete Swap" || action == "Swap Slots" || action == "Start Swap With Preview");
slotName = (!specifySlotFlag || slotNameNotNeeded) ? defaultslotname : slotName;

appService = new AzureAppService(azureEndpoint, resourceGroupName, webAppName, slotName);
azureAppServiceUtils = new AzureAppServiceUtils(appService);
let appServiceKuduService = await azureAppServiceUtils.getKuduService();
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureAppServiceManageV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"version": {
"Major": 0,
"Minor": 2,
"Patch": 63
"Patch": 64
},
"minimumAgentVersion": "1.102.0",
"instanceNameFormat": "$(Action): $(WebAppName)",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureAppServiceManageV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"version": {
"Major": 0,
"Minor": 2,
"Patch": 63
"Patch": 64
},
"minimumAgentVersion": "1.102.0",
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
Expand Down