-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
111 lines (102 loc) · 3.56 KB
/
Copy pathazure-pipelines.yml
File metadata and controls
111 lines (102 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
trigger:
branches:
include:
- main
- dev
tags:
include:
- v*
variables:
python.version: '3.10'
baseFolder: .
componentArtifactName: 'azure_functions_durable'
#componentArtifactName: 'dist'
stages:
- stage: Build
displayName: Build PyPi Artifact
jobs:
- job: Build_Durable_Functions
displayName: Build Python Package
pool:
name: "1ES-Hosted-AzFunc"
demands:
- ImageOverride -equals MMSUbuntu20.04TLS
steps:
- task: PipAuthenticate@1
displayName: 'Authenticate to CFS PyPI feed'
inputs:
artifactFeeds: 'public/upstream-public'
onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
- script: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install "setuptools>=69.3.0" setuptools_scm wheel
# Pin an older azure-functions (< 1.26.0) that predates the
# centralized df_dumps / df_loads serializers so this job exercises
# the legacy serialization fallback in df_serialization. The
# Test_Functions_Sdk_Path job covers the SDK-delegated branch.
pip install "azure-functions<1.26.0"
workingDirectory: $(baseFolder)
displayName: 'Install dependencies'
- script: |
cd azure
flake8 . --count --show-source --statistics
displayName: 'Run lint test with flake8'
- script: |
pip install pytest pytest-azurepipelines
pytest --ignore=samples-v2
displayName: 'pytest'
- task: ManifestGeneratorTask@0
displayName: "SBOM Generation Task"
inputs:
BuildComponentPath: '$(baseFolder)'
BuildDropPath: $(baseFolder)
Verbosity: "Information"
- script: |
python setup.py sdist bdist_wheel
workingDirectory: $(baseFolder)
displayName: 'Building'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: dist'
inputs:
PathtoPublish: dist
ArtifactName: $(componentArtifactName)
- job: Test_Functions_Sdk_Path
displayName: Test SDK Serialization Path (Py 3.13)
# The Build_Durable_Functions job runs on Python 3.10 with an older
# azure-functions (< 1.26.0) pinned, so it only exercises the legacy
# serialization fallback. This job runs on Python 3.13 with the beta
# that first ships df_dumps / df_loads to cover the SDK-delegated branch
# in df_serialization.
# TODO: change the override to 'azure-functions>=2.2.0' once 2.2.0 GA
# ships, and drop the explicit install step.
pool:
name: "1ES-Hosted-AzFunc"
demands:
- ImageOverride -equals MMSUbuntu20.04TLS
steps:
- task: PipAuthenticate@1
displayName: 'Authenticate to CFS PyPI feed'
inputs:
artifactFeeds: 'public/upstream-public'
onlyAddExtraIndex: false
- task: UsePythonVersion@0
inputs:
versionSpec: '3.13'
- script: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install "azure-functions>=2.2.0b5"
workingDirectory: $(baseFolder)
displayName: 'Install dependencies (SDK serializers)'
- script: |
pip install pytest pytest-azurepipelines
pytest --ignore=samples-v2
displayName: 'pytest'