Skip to content

Commit

Permalink
Merge pull request #272 from microsoft/dev
Browse files Browse the repository at this point in the history
fix cli bug and build
  • Loading branch information
colbylwilliams authored Jun 30, 2021
2 parents e19540b + 698a1b8 commit c8f0e0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
az tc deploy --subscription ${{ secrets.TEAMCLOUD_SUBSCRIPTION }} -l eastus --principal-name ${{ secrets.TEAMCLOUD_RM_USERNAME }} --principal-password ${{ secrets.TEAMCLOUD_RM_PASSWORD }} -v ${{steps.resolve-tag.outputs.result}} --skip-name-validation -n teamclouddemo
echo "setting default teamcloud instance in configuration"
az configure -d tc-base-url=https://teamclouddemo.azurewebsites.net
az configure -d tc-url=https://teamclouddemo.azurewebsites.net
echo "deploying demo teamcloud web instance"
az tc app deploy --subscription ${{ secrets.TEAMCLOUD_SUBSCRIPTION }} -c ${{ secrets.TEAMCLOUD_WEB_USERNAME }} --scope ${{ secrets.TEAMCLOUD_WEB_SCOPE }} -v ${{steps.resolve-tag.outputs.result}}
Expand Down
11 changes: 6 additions & 5 deletions client/tc/azext_tc/_deploy_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from knack.util import CLIError
from knack.log import get_logger
from azure.cli.core.commands import LongRunningOperation
from azure.cli.core.commands.client_factory import get_subscription_id
from azure.cli.core.profiles import ResourceType, get_sdk
from azure.cli.core.util import (can_launch_browser, open_page_in_browser, in_cloud_console,
random_string, sdk_no_wait, should_disable_connection_verify)
Expand Down Expand Up @@ -76,24 +77,24 @@ def github_release_version_exists(cli_ctx, version, repo, org='microsoft'):


def get_resource_group_by_name(cli_ctx, resource_group_name):

subscription_id = get_subscription_id(cli_ctx)
try:
resource_client = resource_client_factory(cli_ctx).resource_groups
return resource_client.get(resource_group_name), resource_client.config.subscription_id
return resource_client.get(resource_group_name), subscription_id
except Exception as ex: # pylint: disable=broad-except
error = getattr(ex, 'Azure Error', ex)
if error != 'ResourceGroupNotFound':
return None, resource_client.config.subscription_id
return None, subscription_id
raise


def create_resource_group_name(cli_ctx, resource_group_name, location, tags=None):

subscription_id = get_subscription_id(cli_ctx)
ResourceGroup = get_sdk(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES,
'ResourceGroup', mod='models')
resource_client = resource_client_factory(cli_ctx).resource_groups
parameters = ResourceGroup(location=location.lower(), tags=tags)
return resource_client.create_or_update(resource_group_name, parameters), resource_client.config.subscription_id
return resource_client.create_or_update(resource_group_name, parameters), subscription_id


def set_appconfig_keys(cmd, appconfig_conn_string, kvs):
Expand Down

0 comments on commit c8f0e0f

Please sign in to comment.