-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathbuild.yml
More file actions
62 lines (53 loc) · 2.02 KB
/
build.yml
File metadata and controls
62 lines (53 loc) · 2.02 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
jobs:
- job: Build
templateContext:
outputs:
- output: pipelineArtifact
path: $(build.artifactStagingDirectory)
artifact: drop
sbomBuildDropPath: $(System.DefaultWorkingDirectory)
sbomPackageName: 'Durable Functions Python'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9.x'
- script: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install wheel
workingDirectory: $(System.DefaultWorkingDirectory)
displayName: 'Install dependencies'
- script: |
cd azure
python -m flake8 . --count --show-source --statistics
displayName: 'Run lint test with flake8'
- script: |
pip install pytest pytest-azurepipelines
pytest --ignore=samples-v2
displayName: 'pytest'
- script: |
python setup.py sdist bdist_wheel
workingDirectory: $(System.DefaultWorkingDirectory)
displayName: 'Building'
- task: CopyFiles@2
displayName: 'Copy publish file to Artifact Staging Directory'
inputs:
SourceFolder: dist
Contents: '**'
TargetFolder: $(Build.ArtifactStagingDirectory)
- task: ManualValidation@1
timeoutInMinutes: 1440 # task times out in 1 day
inputs:
notifyUsers: |
andystaples@microsoft.com
instructions: 'Approve publish of azure-functions-durable to PyPi'
onTimeout: 'reject'
- script: |
pip install wheel
pip install twine
- task: TwineAuthenticate@1
displayName: Twine Authenticate
inputs:
pythonUploadServiceConnection: azure-functions-durable-pypi
- script: |
python -m twine upload --config-file $(PYPIRC_PATH) dist/*