in src/publishers/zipDeploy.ts [99:117]
private static async restoreScmTemporarySettings(context: IActionContext, original: IAppSettings) {
try {
if (context.authenticationType === AuthenticationType.Scm) {
// Restore previous app settings if they are temporarily changed
if (original.SCM_DO_BUILD_DURING_DEPLOYMENT) {
Logger.Info(`Restoring SCM_DO_BUILD_DURING_DEPLOYMENT in Kudu container to ${original.SCM_DO_BUILD_DURING_DEPLOYMENT}`);
await context.kuduService.updateAppSettingViaKudu({'SCM_DO_BUILD_DURING_DEPLOYMENT': original.SCM_DO_BUILD_DURING_DEPLOYMENT
}, 3, 3, false);
}
if (original.ENABLE_ORYX_BUILD) {
Logger.Info(`Restoring ENABLE_ORYX_BUILD in Kudu container to ${original.ENABLE_ORYX_BUILD}`);
await context.kuduService.updateAppSettingViaKudu({'ENABLE_ORYX_BUILD': original.ENABLE_ORYX_BUILD
}, 3, 3, false);
}
}
} catch (expt) {
Logger.Warn("Restore Application Settings: Failed to restore temporary SCM app settings.");
}
}