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

webapps: Updating default node version used during creates #7821

Merged
merged 3 commits into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions src/command_modules/azure-cli-appservice/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release History

0.2.7
+++++
* webapp, functionapp: Default Node_version updated. Resetting slot swap action, during a two phase swap preserves all the appsettings & connection strings
* remove client side sku check for linux app service plan create

0.2.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi
if not plan_info:
raise CLIError("The plan '{}' doesn't exist".format(plan))
is_linux = plan_info.reserved
node_default_version = "6.9.1"
node_default_version = '8.11.1'
location = plan_info.location
site_config = SiteConfig(app_settings=[])
webapp_def = Site(location=location, site_config=site_config, server_farm_id=plan_info.id, tags=tags)
Expand Down Expand Up @@ -1448,29 +1448,23 @@ def list_slots(cmd, resource_group_name, webapp):
def swap_slot(cmd, resource_group_name, webapp, slot, target_slot=None, action='swap'):
client = web_client_factory(cmd.cli_ctx)
if action == 'swap':
if target_slot is None:
poller = client.web_apps.swap_slot_with_production(resource_group_name,
webapp, slot, True)
else:
poller = client.web_apps.swap_slot_slot(resource_group_name, webapp,
slot, target_slot, True)
poller = client.web_apps.swap_slot_slot(resource_group_name, webapp,
slot, (target_slot or 'production'), True)
return poller
elif action == 'preview':
if target_slot is None:
result = client.web_apps.apply_slot_config_to_production(resource_group_name,
webapp, slot, True)
else:
result = client.web_apps.apply_slot_configuration_slot(resource_group_name, webapp,
slot, target_slot, True)
slot, (target_slot or 'production'), True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we know target_slot is not None, so if should just be target_slot

return result
else: # reset
# we will reset both source slot and target slot
if target_slot is None:
client.web_apps.reset_production_slot_config(resource_group_name, webapp)
else:
client.web_apps.reset_slot_configuration_slot(resource_group_name, webapp, target_slot)

client.web_apps.reset_slot_configuration_slot(resource_group_name, webapp, slot)
return None


Expand Down Expand Up @@ -1876,7 +1870,7 @@ def create_function(cmd, resource_group_name, name, storage_account, plan=None,
# adding appsetting to site to make it a function
site_config.app_settings.append(NameValuePair(name='AzureWebJobsStorage', value=con_string))
site_config.app_settings.append(NameValuePair(name='AzureWebJobsDashboard', value=con_string))
site_config.app_settings.append(NameValuePair(name='WEBSITE_NODE_DEFAULT_VERSION', value='6.5.0'))
site_config.app_settings.append(NameValuePair(name='WEBSITE_NODE_DEFAULT_VERSION', value='8.11.1'))

if consumption_plan_location is None:
site_config.always_on = True
Expand Down
Loading