-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Need a cmdlet to publish a function app (from Azure Dev Ops)
Scenario: A customer uses Azure PowerShell to publish to their function app in Azure. This cmdlet can be used anywhere where Azure PowerShell is available including from Azure DevOps.
The cmdlet signature would look like this:
Publish-AzFunctionApp -Name <string> -ResourceGroupName<string> -ArchivePath <string> -RetryCount [-Force] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
Name is the function app name
ResourceGroupName is the resource group name
ArchivePath is the path to the zip file with the app content
RetryCount is the number of tries to publish the app content
Force is to bypass the confirmation for the app deployment
AsJob the publish command will be run as a Job
The cmdlet will start a zip deploy and we will pull the status of the deployment until it completes. This cmdlet will follow the implementation for ARM deployments defined here: https://github.com/microsoft/azure-pipelines-tasks/blob/f462aeacedf56ceeeacd3d29027471a59573eaee/Tasks/Common/AzureRmDeploy-common/azure-arm-rest/azure-arm-app-service-kudu.ts#L615.