Skip to content

Commit 6a398b2

Browse files
Merge pull request #266310 from juliakm/users/jukullam/python-update
Update DevOps Pipelines article for functions to use Python 3.9
2 parents 3244eb9 + a9ff6cc commit 6a398b2

File tree

1 file changed

+4
-65
lines changed

1 file changed

+4
-65
lines changed

articles/azure-functions/functions-how-to-azure-devops.md

Lines changed: 4 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,14 @@ steps:
149149
150150
Use one of the following samples to create a YAML file to build an app for a specific Python version. Python is only supported for function apps running on Linux.
151151
152-
**Version 3.7**
153-
154152
```yaml
155153
pool:
156154
vmImage: ubuntu-latest
157155
steps:
158156
- task: UsePythonVersion@0
159-
displayName: "Setting Python version to 3.7 as required by functions"
157+
displayName: "Set Python version to 3.9"
160158
inputs:
161-
versionSpec: '3.7'
159+
versionSpec: '3.9'
162160
architecture: 'x64'
163161
- bash: |
164162
if [ -f extensions.csproj ]
@@ -178,35 +176,6 @@ steps:
178176
artifactName: 'drop'
179177
```
180178
181-
**Version 3.6**
182-
183-
```yaml
184-
pool:
185-
vmImage: ubuntu-latest
186-
steps:
187-
- task: UsePythonVersion@0
188-
displayName: "Setting Python version to 3.6 as required by functions"
189-
inputs:
190-
versionSpec: '3.6'
191-
architecture: 'x64'
192-
- bash: |
193-
if [ -f extensions.csproj ]
194-
then
195-
dotnet build extensions.csproj --output ./bin
196-
fi
197-
pip install --target="./.python_packages/lib/python3.6/site-packages" -r ./requirements.txt
198-
- task: ArchiveFiles@2
199-
displayName: "Archive files"
200-
inputs:
201-
rootFolderOrFile: "$(System.DefaultWorkingDirectory)"
202-
includeRootFolder: false
203-
archiveFile: "$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip"
204-
- task: PublishBuildArtifacts@1
205-
inputs:
206-
PathtoPublish: '$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip'
207-
artifactName: 'drop'
208-
```
209-
210179
# [PowerShell](#tab/powershell)
211180
212181
You can use the following sample to create a YAML file to package a PowerShell app. PowerShell is supported only for Windows Azure Functions.
@@ -471,16 +440,15 @@ steps:
471440

472441
Use one of the following samples to create a YAML file to build an app for a specific Python version. Python is only supported for function apps running on Linux.
473442

474-
**Version 3.7**
475443

476444
```yaml
477445
pool:
478446
vmImage: ubuntu-latest
479447
steps:
480448
- task: UsePythonVersion@0
481-
displayName: "Setting Python version to 3.7 as required by functions"
449+
displayName: "Set Python version to 3.9"
482450
inputs:
483-
versionSpec: '3.7'
451+
versionSpec: '3.9'
484452
architecture: 'x64'
485453
- bash: |
486454
if [ -f extensions.csproj ]
@@ -500,35 +468,6 @@ steps:
500468
artifactName: 'drop'
501469
```
502470

503-
**Version 3.6**
504-
505-
```yaml
506-
pool:
507-
vmImage: ubuntu-latest
508-
steps:
509-
- task: UsePythonVersion@0
510-
displayName: "Setting Python version to 3.6 as required by functions"
511-
inputs:
512-
versionSpec: '3.6'
513-
architecture: 'x64'
514-
- bash: |
515-
if [ -f extensions.csproj ]
516-
then
517-
dotnet build extensions.csproj --output ./bin
518-
fi
519-
pip install --target="./.python_packages/lib/python3.6/site-packages" -r ./requirements.txt
520-
- task: ArchiveFiles@2
521-
displayName: "Archive files"
522-
inputs:
523-
rootFolderOrFile: "$(System.DefaultWorkingDirectory)"
524-
includeRootFolder: false
525-
archiveFile: "$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip"
526-
- task: PublishBuildArtifacts@1
527-
inputs:
528-
PathtoPublish: '$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip'
529-
artifactName: 'drop'
530-
```
531-
532471
# [PowerShell](#tab/powershell)
533472

534473
You can use the following sample to create a YAML file to package a PowerShell app. PowerShell is supported only for Windows Azure Functions.

0 commit comments

Comments
 (0)