Add a deployment script for azure function services.
57311057
Pedro Silva
committed
1 changed file
deploy-azure-function-job.yml
/build-templates/services/deploy-azure-function-job.yml+28
/build-templates/services/deploy-azure-function-job.yml
Add comment 1 Plus  parameters:
Add comment 2 Plus   azureSubscription: ''
Add comment 3 Plus   functionAppName: ''
Add comment 4 Plus   env: 'azure-test'
Add comment 5 Plus  
Add comment 6 Plus  jobs:
Add comment 7 Plus  - deployment: Deploy
Add comment 8 Plus   displayName: Deploy Azure Function
Add comment 9 Plus   # define the target environment -- defaults to local-nuget if not specified by caller.
Add comment 10 Plus   environment: '${{ parameters.env }}'
Add comment 11 Plus  
Add comment 12 Plus   strategy:
Add comment 13 Plus   runOnce:
Add comment 14 Plus   deploy:
Add comment 15 Plus   steps:
Add comment 16 Plus   # first download the artifacts from the drop folder created by the build jobs.
Add comment 17 Plus   - download: current
Add comment 18 Plus   artifact: drop
Add comment 19 Plus  
Add comment 20 Plus   # push the packages to the local feed in your Azure DevOps organization.
Add comment 21 Plus   - task: AzureFunctionApp@1
Add comment 22 Plus   displayName: 'Azure functions app deploy'
Add comment 23 Plus   inputs:
Add comment 24 Plus   azureSubscription: '${{ azureSubscription }}'
Add comment 25 Plus   appType: functionApp
Add comment 26 Plus   appName: ${{ functionAppName }}
Add comment 27 Plus   package: '$(Pipeline.Workspace)/drop/$(Build.BuildId).zip'
Add comment 28 Plus