| 1 |
variables: |
| 2 |
azureSubscription: '{ARM ACCESS TOKEN NAME}' |
| 3 |
functionappName: '{NAME OF FUNCTIONAPP}' |
| 4 |
|
| 5 |
pool: |
| 6 |
vmImage: ubuntu-16.04 |
| 7 |
|
| 8 |
steps: |
| 9 |
- script: | |
| 10 |
dotnet restore |
| 11 |
dotnet build --configuration Release |
| 12 |
- task: DotNetCoreCLI@2 |
| 13 |
inputs: |
| 14 |
command: publish |
| 15 |
arguments: '--configuration Release --output publish_output' |
| 16 |
projects: '*.csproj' |
| 17 |
publishWebProjects: false |
| 18 |
modifyOutputPath: true |
| 19 |
zipAfterPublish: false |
| 20 |
- task: ArchiveFiles@2 |
| 21 |
displayName: "Archive files" |
| 22 |
inputs: |
| 23 |
rootFolderOrFile: "$(System.DefaultWorkingDirectory)/publish_output/s" |
| 24 |
includeRootFolder: false |
| 25 |
archiveFile: "$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip" |
| 26 |
- task: PublishBuildArtifacts@1 |
| 27 |
inputs: |
| 28 |
PathtoPublish: '$(System.DefaultWorkingDirectory)/$(Build.BuildId).zip' |
| 29 |
name: 'drop' |
| 30 |
- task: AzureRmWebAppDeployment@4 |
| 31 |
inputs: |
| 32 |
connectionType: 'AzureRM' |
| 33 |
azureSubscription: "$(azureSubscription)" |
| 34 |
appType: 'functionAppLinux' |
| 35 |
webAppName: "$(functionappName)" |