| 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 # comment out if not using extensions |
| 11 |
dotnet build --output \'./bin/\' # comment out if not using extensions |
| 12 |
npm install |
| 13 |
npm run build --if-present |
| 14 |
npm prune --production |
| 15 |
- task: ArchiveFiles@2 |
| 16 |
displayName: "Archive files" |
| 17 |
inputs: |
| 18 |
rootFolderOrFile: "$(System.DefaultWorkingDirectory)" |
| 19 |
includeRootFolder: false |
| 20 |
archiveFile: "$(System.DefaultWorkingDirectory)/$(Build.BuildId).zip" |
| 21 |
- task: PublishBuildArtifacts@1 |
| 22 |
inputs: |
| 23 |
PathtoPublish: '$(System.DefaultWorkingDirectory)/$(Build.BuildId).zip' |
| 24 |
name: 'drop' |
| 25 |
- task: AzureRmWebAppDeployment@4 |
| 26 |
inputs: |
| 27 |
connectionType: 'AzureRM' |
| 28 |
azureSubscription: "$(azureSubscription)" |
| 29 |
appType: 'functionAppLinux' |
| 30 |
webAppName: "$(functionappName)" |