diff --git a/Tasks/AzureContainerAppsV1/Strings/resources.resjson/en-US/resources.resjson b/Tasks/AzureContainerAppsV1/Strings/resources.resjson/en-US/resources.resjson index 2d6e41bfb683..a5605a20a929 100644 --- a/Tasks/AzureContainerAppsV1/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/AzureContainerAppsV1/Strings/resources.resjson/en-US/resources.resjson @@ -30,6 +30,8 @@ "loc.input.help.containerAppEnvironment": "The name of the Azure Container App environment to use with the application. If not provided, an existing environment in the resource group of the Container App will be used, otherwise, an environment will be created in the form of `-env`.", "loc.input.label.runtimeStack": "Application runtime stack", "loc.input.help.runtimeStack": "The platform version stack that the application runs in when deployed to the Azure Container App. This should be provided in the form of `:`. If not provided, this value is determined by Oryx based on the contents of the provided application. Please view the following document for more information on the supported runtime stacks for Oryx: https://github.com/microsoft/Oryx/blob/main/doc/supportedRuntimeVersions.md", + "loc.input.label.kind": "Container App kind", + "loc.input.help.kind": "Set to `functionapp` to get built in support and autoscaling to run Azure functions on Azure Container apps.", "loc.input.label.targetPort": "Application target port", "loc.input.help.targetPort": "The designated port for the application to run on. If no value is provided and the builder is used to build the runnable application image, the target port will be set to 80 for Python applications and 8080 for all other platform applications. If no value is provided when creating a Container App, the target port will default to 80. Note: when using this task to update a Container App, the target port may be updated if not provided based on changes to the ingress property.", "loc.input.label.location": "Location of the Container App", diff --git a/Tasks/AzureContainerAppsV1/azurecontainerapps.ts b/Tasks/AzureContainerAppsV1/azurecontainerapps.ts index 9876cc368319..6706ab869ac8 100644 --- a/Tasks/AzureContainerAppsV1/azurecontainerapps.ts +++ b/Tasks/AzureContainerAppsV1/azurecontainerapps.ts @@ -103,6 +103,7 @@ export class azurecontainerapps { // Miscellaneous properties private static imageToBuild: string; private static runtimeStack: string; + private static kind: string; private static ingress: string; private static targetPort: string; private static shouldUseUpdateCommand: boolean; @@ -472,6 +473,14 @@ export class azurecontainerapps { this.commandLineArgs.push(`--ingress ${this.ingress}`); this.commandLineArgs.push(`--target-port ${this.targetPort}`); } + + // Get the kind input + this.kind = tl.getInput('kind', false); + + // Set the value of kind if provided + if (!util.isNullOrEmpty(this.kind)) { + this.commandLineArgs.push(`--kind ${this.kind}`); + } } const environmentVariables: string = tl.getInput('environmentVariables', false); diff --git a/Tasks/AzureContainerAppsV1/task.json b/Tasks/AzureContainerAppsV1/task.json index 367d9981ba62..8371116c6682 100644 --- a/Tasks/AzureContainerAppsV1/task.json +++ b/Tasks/AzureContainerAppsV1/task.json @@ -18,7 +18,7 @@ ], "version": { "Major": 1, - "Minor": 255, + "Minor": 258, "Patch": 0 }, "minimumAgentVersion": "2.144.0", @@ -127,6 +127,13 @@ "required": false, "helpMarkDown": "The platform version stack that the application runs in when deployed to the Azure Container App. This should be provided in the form of `:`. If not provided, this value is determined by Oryx based on the contents of the provided application. Please view the following document for more information on the supported runtime stacks for Oryx: https://github.com/microsoft/Oryx/blob/main/doc/supportedRuntimeVersions.md" }, + { + "name": "kind", + "type": "string", + "label": "Container App kind", + "required": false, + "helpMarkDown": "Set to `functionapp` to get built in support and autoscaling to run Azure functions on Azure Container apps." + }, { "name": "targetPort", "type": "string", diff --git a/Tasks/AzureContainerAppsV1/task.loc.json b/Tasks/AzureContainerAppsV1/task.loc.json index 0274563895d8..3f0391c8ec50 100644 --- a/Tasks/AzureContainerAppsV1/task.loc.json +++ b/Tasks/AzureContainerAppsV1/task.loc.json @@ -18,7 +18,7 @@ ], "version": { "Major": 1, - "Minor": 255, + "Minor": 258, "Patch": 0 }, "minimumAgentVersion": "2.144.0", @@ -127,6 +127,13 @@ "required": false, "helpMarkDown": "ms-resource:loc.input.help.runtimeStack" }, + { + "name": "kind", + "type": "string", + "label": "ms-resource:loc.input.label.kind", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.kind" + }, { "name": "targetPort", "type": "string",