# Node.js Function App to Linux on Azure # Build a Node.js function app and deploy it to Azure as a Linux function app. # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript trigger: - main variables: # Azure Resource Manager connection created during pipeline creation azureSubscription: 'AZURE_SUBSCRIPTION' # Function app name functionAppName: 'FUNCTION_NAME' # Environment name environmentName: 'ENVINRONMENT' # Agent VM image name vmImageName: 'ubuntu-20.04' stages: - stage: Publish displayName: Publish stage jobs: - job: Publish displayName: Publish pool: vmImage: $(vmImageName) steps: - task: AzureCLI@2 inputs: azureSubscription: 'AZURE SUBSCRIPTION' scriptType: 'bash' scriptLocation: 'inlineScript' inlineScript: | wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb sudo apt-get update sudo apt-get install azure-functions-core-tools-3 func azure functionapp publish FUNCTION_NAME --build remote --javascript