| 1 |
# -------------------------------------------------------------------------------------------- |
| 2 |
# Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 |
# Licensed under the MIT License. See License.txt in the project root for license information. |
| 4 |
# -------------------------------------------------------------------------------------------- |
| 5 |
# Starter template for Azure functions build -- python on linux |
| 6 |
trigger: |
| 7 |
- master |
| 8 |
pool: |
| 9 |
vmImage: 'ubuntu-16.04' |
| 10 |
steps: |
| 11 |
- task: DotNetCoreCLI@2 |
| 12 |
displayName: '.NET Core build extensions' |
| 13 |
inputs: |
| 14 |
projects: extensions.csproj |
| 15 |
arguments: '--runtime ubuntu.16.04-x64 --output bin/' |
| 16 |
- task: UsePythonVersion@0 |
| 17 |
displayName: "Setting python version to 3.6 as required by functions" |
| 18 |
inputs: |
| 19 |
versionSpec: '3.6' |
| 20 |
architecture: 'x64' |
| 21 |
- script: | |
| 22 |
python3.6 -m venv worker_venv |
| 23 |
source worker_venv/bin/activate |
| 24 |
pip3.6 install setuptools |
| 25 |
pip3.6 install -r requirements.txt |
| 26 |
- task: ArchiveFiles@2 |
| 27 |
displayName: 'Archive files' |
| 28 |
inputs: |
| 29 |
rootFolderOrFile: '$(System.DefaultWorkingDirectory)' |
| 30 |
includeRootFolder: false |
| 31 |
archiveFile: '$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip' |
| 32 |
- task: PublishBuildArtifacts@1 |
| 33 |
inputs: |
| 34 |
PathtoPublish: '$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip' |
| 35 |
name: 'drop' |