From 7990b8f00f2d982eccf3b44733a7c0e1b09b3f24 Mon Sep 17 00:00:00 2001 From: MicroFish91 Date: Wed, 22 Feb 2023 16:35:21 -0800 Subject: [PATCH 1/2] add container app update call --- src/commands/deployImage/deployImage.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands/deployImage/deployImage.ts b/src/commands/deployImage/deployImage.ts index 0351f4157..f906df571 100644 --- a/src/commands/deployImage/deployImage.ts +++ b/src/commands/deployImage/deployImage.ts @@ -3,13 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ContainerApp, KnownActiveRevisionsMode } from "@azure/arm-appcontainers"; +import { ContainerApp, ContainerAppsAPIClient, KnownActiveRevisionsMode } from "@azure/arm-appcontainers"; import { VerifyProvidersStep } from "@microsoft/vscode-azext-azureutils"; import { AzureWizard, AzureWizardExecuteStep, AzureWizardPromptStep, createSubscriptionContext, ITreeItemPickerContext } from "@microsoft/vscode-azext-utils"; import { MessageItem, ProgressLocation, window } from "vscode"; import { acrDomain, webProvider } from "../../constants"; import { ext } from "../../extensionVariables"; import { ContainerAppItem, getContainerEnvelopeWithSecrets, refreshContainerApp } from "../../tree/ContainerAppItem"; +import { createContainerAppsAPIClient } from '../../utils/azureClients'; import { localize } from "../../utils/localize"; import { pickContainerApp } from "../../utils/pickContainerApp"; import { EnvironmentVariablesListStep } from "../createContainerApp/EnvironmentVariablesListStep"; @@ -88,6 +89,8 @@ export async function deployImage(context: ITreeItemPickerContext & Partial { await window.withProgress({ location: ProgressLocation.Notification, title: creatingRevision }, async (): Promise => { ext.outputChannel.appendLog(creatingRevision); + const appClient: ContainerAppsAPIClient = await createContainerAppsAPIClient(wizardContext); + await appClient.containerApps.beginCreateOrUpdateAndWait(containerApp.resourceGroup, containerApp.name, containerAppEnvelope); const updatedContainerApp = await ContainerAppItem.Get(context, subscription, containerApp.resourceGroup, containerApp.name); void showContainerAppCreated(updatedContainerApp, true); }); From d8dc8900250036ba7788203ca0a5ea70da32dbfe Mon Sep 17 00:00:00 2001 From: MicroFish91 Date: Wed, 22 Feb 2023 16:39:28 -0800 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ac122f0c..81ef3b5fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Fixed +* Add container app update call back to `deployImage` by @MicroFish91 in [#266](https://github.com/microsoft/vscode-azurecontainerapps/pull/266) * Remove legacy reference to `rgApi` by @MicroFish91 in [#264](https://github.com/microsoft/vscode-azurecontainerapps/pull/264) ## 0.4.0 - 2023-02-22