Skip to content
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
030a60b
Initial implementation
MicroFish91 Aug 9, 2024
590d35e
Update step priorities
MicroFish91 Aug 9, 2024
fb87c28
Update acrliststep call
MicroFish91 Aug 9, 2024
8dea143
Correct an old priority
MicroFish91 Aug 9, 2024
97fc630
Fix typing
MicroFish91 Aug 9, 2024
8733ed4
Update comment
MicroFish91 Aug 9, 2024
73ec21d
Update shouldPrompt comment with ref link
MicroFish91 Aug 9, 2024
1db17e6
Add managed environment context requirements
MicroFish91 Aug 12, 2024
011cc6b
Add Required context
MicroFish91 Aug 12, 2024
7df9702
PR feedback
MicroFish91 Aug 22, 2024
e844c07
Merge with main
MicroFish91 Sep 9, 2024
d93d25b
Feedback to rename contexts
MicroFish91 Sep 9, 2024
ad4745d
Add/update dependencies
MicroFish91 Sep 17, 2024
ce1794d
First pass core implementation
MicroFish91 Sep 17, 2024
55a8019
Add AcrPullVerifyStep
MicroFish91 Sep 17, 2024
2c926dd
Updates to AcrPullVerifyStep
MicroFish91 Sep 18, 2024
5a1246f
Update comment
MicroFish91 Sep 18, 2024
79ca374
Don't call list creds if identity
MicroFish91 Sep 18, 2024
c50163a
Update should execute condition
MicroFish91 Sep 20, 2024
4669d32
Merge branch 'main' of https://github.com/microsoft/vscode-azureconta…
MicroFish91 Sep 23, 2024
0d728db
Always start with quick start
MicroFish91 Sep 23, 2024
00fe87a
Merge branch 'main' of https://github.com/microsoft/vscode-azureconta…
MicroFish91 Sep 23, 2024
60c12b4
Merge branch 'mwf/cr-ii' of https://github.com/microsoft/vscode-azure…
MicroFish91 Sep 23, 2024
744c684
Merge branch 'mwf/cr-iii' of https://github.com/microsoft/vscode-azur…
MicroFish91 Sep 23, 2024
6cf9dfb
Merge with main
MicroFish91 Oct 7, 2024
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
42 changes: 17 additions & 25 deletions src/commands/createContainerApp/createContainerApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

import { type ResourceGroup } from "@azure/arm-resources";
import { LocationListStep, ResourceGroupListStep } from "@microsoft/vscode-azext-azureutils";
import { AzureWizard, createSubscriptionContext, nonNullProp, nonNullValue, nonNullValueAndProp, type AzureWizardExecuteStep, type AzureWizardPromptStep, type IActionContext } from "@microsoft/vscode-azext-utils";
import { AzureWizard, createSubscriptionContext, nonNullProp, nonNullValue, nonNullValueAndProp, type IActionContext } from "@microsoft/vscode-azext-utils";
import { ImageSource } from "../../constants";
import { ext } from "../../extensionVariables";
import { ContainerAppItem } from "../../tree/ContainerAppItem";
import { ManagedEnvironmentItem } from "../../tree/ManagedEnvironmentItem";
Expand Down Expand Up @@ -35,24 +36,11 @@ export async function createContainerApp(context: IActionContext, node?: Managed
...await createActivityContext(),
subscription: node.subscription,
managedEnvironment: node.managedEnvironment,
alwaysPromptIngress: true
imageSource: ImageSource.QuickstartImage,
};

const title: string = localize('createContainerApp', 'Create container app');

const promptSteps: AzureWizardPromptStep<ContainerAppCreateContext>[] = [
new ContainerAppNameStep(),
new ImageSourceListStep(),
new IngressPromptStep(),
];

const executeSteps: AzureWizardExecuteStep<ContainerAppCreateContext>[] = [
getVerifyProvidersStep<ContainerAppCreateContext>(),
new ContainerAppCreateStep(),
];

if (isAzdExtensionInstalled()) {
context.telemetry.properties.isAzdWorkspaceProject = 'true';
wizardContext.telemetry.properties.isAzdWorkspaceProject = 'true';
}

// Use the same resource group and location as the parent resource (managed environment)
Expand All @@ -63,25 +51,29 @@ export async function createContainerApp(context: IActionContext, node?: Managed
await LocationListStep.setLocation(wizardContext, nonNullProp(node.resource, 'location'));

const wizard: AzureWizard<ContainerAppCreateContext> = new AzureWizard(wizardContext, {
title,
promptSteps,
executeSteps,
title: localize('createContainerApp', 'Create container app'),
promptSteps: [
new ContainerAppNameStep(),
new ImageSourceListStep(),
new IngressPromptStep(),
],
executeSteps: [
getVerifyProvidersStep<ContainerAppCreateContext>(),
new ContainerAppCreateStep(),
],
showLoadingPrompt: true
});

// we want to add the quick start image _only_ for the create scenairo
wizardContext.showQuickStartImage = true;

await wizard.prompt();
const newContainerAppName = nonNullProp(wizardContext, 'newContainerAppName');

const newContainerAppName = nonNullProp(wizardContext, 'newContainerAppName');
await ext.state.showCreatingChild(
node.managedEnvironment.id,
localize('creating', 'Creating "{0}"...', newContainerAppName),
async () => {
wizardContext.activityTitle = localize('createNamedContainerApp', 'Create container app "{0}"', newContainerAppName);
await wizard.execute();
});
}
);

const createdContainerApp = nonNullProp(wizardContext, 'containerApp');
if (!wizardContext.suppressNotification) {
Expand Down