Skip to content

Commit a83f863

Browse files
authored
Fix updating for container images (#266)
1 parent dfbbfb0 commit a83f863

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Fixed
66

7+
* Add container app update call back to `deployImage` by @MicroFish91 in [#266](https://github.com/microsoft/vscode-azurecontainerapps/pull/266)
78
* Remove legacy reference to `rgApi` by @MicroFish91 in [#264](https://github.com/microsoft/vscode-azurecontainerapps/pull/264)
89

910
## 0.4.0 - 2023-02-22

src/commands/deployImage/deployImage.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { ContainerApp, KnownActiveRevisionsMode } from "@azure/arm-appcontainers";
6+
import { ContainerApp, ContainerAppsAPIClient, KnownActiveRevisionsMode } from "@azure/arm-appcontainers";
77
import { VerifyProvidersStep } from "@microsoft/vscode-azext-azureutils";
88
import { AzureWizard, AzureWizardExecuteStep, AzureWizardPromptStep, createSubscriptionContext, ITreeItemPickerContext } from "@microsoft/vscode-azext-utils";
99
import { MessageItem, ProgressLocation, window } from "vscode";
1010
import { acrDomain, webProvider } from "../../constants";
1111
import { ext } from "../../extensionVariables";
1212
import { ContainerAppItem, getContainerEnvelopeWithSecrets, refreshContainerApp } from "../../tree/ContainerAppItem";
13+
import { createContainerAppsAPIClient } from '../../utils/azureClients';
1314
import { localize } from "../../utils/localize";
1415
import { pickContainerApp } from "../../utils/pickContainerApp";
1516
import { EnvironmentVariablesListStep } from "../createContainerApp/EnvironmentVariablesListStep";
@@ -88,6 +89,8 @@ export async function deployImage(context: ITreeItemPickerContext & Partial<IDep
8889
await ext.state.runWithTemporaryDescription(containerApp.id, localize('creating', 'Creating...'), async () => {
8990
await window.withProgress({ location: ProgressLocation.Notification, title: creatingRevision }, async (): Promise<void> => {
9091
ext.outputChannel.appendLog(creatingRevision);
92+
const appClient: ContainerAppsAPIClient = await createContainerAppsAPIClient(wizardContext);
93+
await appClient.containerApps.beginCreateOrUpdateAndWait(containerApp.resourceGroup, containerApp.name, containerAppEnvelope);
9194
const updatedContainerApp = await ContainerAppItem.Get(context, subscription, containerApp.resourceGroup, containerApp.name);
9295
void showContainerAppCreated(updatedContainerApp, true);
9396
});

0 commit comments

Comments
 (0)