Skip to content

Commit 68b5025

Browse files
scbeddVinothini Dharmaraj
authored andcommitted
Address Breaking Release (#36511)
* address the breaking release phase by using newer python version for tasks * move usage of python version to as early as possible in build, analyze, build_extended, and test jobs * during test phase, don't auto-prepend the path with the new venv location
1 parent 82be110 commit 68b5025

File tree

5 files changed

+28
-14
lines changed

5 files changed

+28
-14
lines changed

eng/pipelines/templates/jobs/ci.tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090

9191
- task: UsePythonVersion@0
9292
inputs:
93-
versionSpec: '3.8'
93+
versionSpec: '3.10'
9494

9595
- template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml
9696
parameters:

eng/pipelines/templates/stages/archetype-python-release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,18 @@ stages:
3434
deploy:
3535
steps:
3636
- checkout: self
37+
38+
- task: UsePythonVersion@0
39+
inputs:
40+
versionSpec: '3.12'
41+
42+
- script: |
43+
set -e
44+
python -m pip install -r eng/release_requirements.txt
45+
displayName: Install Release Dependencies
46+
3747
- template: /eng/common/pipelines/templates/steps/retain-run.yml
48+
3849
- template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml
3950
parameters:
4051
PackageName: "azure-template"

eng/pipelines/templates/steps/build-extended-artifacts.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ steps:
2929
artifactName: 'packages'
3030
targetPath: $(Build.ArtifactStagingDirectory)
3131

32+
- task: UsePythonVersion@0
33+
displayName: 'Use Python 3.11'
34+
inputs:
35+
versionSpec: '3.11'
36+
3237
- template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml
3338
parameters:
3439
PackageName: "azure-template"
@@ -42,10 +47,7 @@ steps:
4247
displayName: 'Tag scheduled builds'
4348
condition: and(eq(variables['Build.SourceBranchName'], variables['DefaultBranch']), eq(variables['Build.Reason'],'Schedule'))
4449
45-
- task: UsePythonVersion@0
46-
displayName: 'Use Python 3.11'
47-
inputs:
48-
versionSpec: '3.11'
50+
- template: /eng/pipelines/templates/steps/use-venv.yml
4951

5052
- script: |
5153
python -m pip install setuptools==58.3.0
@@ -67,8 +69,8 @@ steps:
6769
inputs:
6870
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
6971
arguments: >-
70-
"$(TargetingString)"
71-
--service="${{ parameters.ServiceDirectory }}"
72+
"$(TargetingString)"
73+
--service="${{ parameters.ServiceDirectory }}"
7274
--toxenv=sphinx
7375
7476
- pwsh: |
@@ -90,7 +92,7 @@ steps:
9092
$directoryExists = Test-Path -Path "$(Build.SourcesDirectory)/_docs"
9193
Write-Output "##vso[task.setvariable variable=DirectoryExists]$directoryExists"
9294
displayName: Check if docs directory exists
93-
95+
9496
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
9597
parameters:
9698
ArtifactPath: '$(Build.SourcesDirectory)/_docs'

eng/pipelines/templates/steps/build-package-artifacts.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ parameters:
3131
# However, please note that this variable will not ALWAYS be set. If using `build-artifacts.yml`, ensure that this variable is set AT LEAST
3232
# to "linux", otherwise the primary tasks will not be run as expected. APIStub, Docs, etc are NOT run on machines that aren't linux.
3333
steps:
34+
- task: UsePythonVersion@0
35+
displayName: 'Use Python $(PythonVersion)'
36+
inputs:
37+
versionSpec: $(PythonVersion)
38+
3439
- template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml@self
3540
parameters:
3641
PackageName: "azure-template"
@@ -44,12 +49,6 @@ steps:
4449
displayName: 'Tag scheduled builds'
4550
condition: and(eq(variables['Build.SourceBranchName'], variables['DefaultBranch']), eq(variables['Build.Reason'],'Schedule'))
4651
47-
- task: UsePythonVersion@0
48-
displayName: 'Use Python $(PythonVersion)'
49-
inputs:
50-
versionSpec: $(PythonVersion)
51-
52-
5352
- template: /eng/pipelines/templates/steps/use-venv.yml
5453
parameters:
5554
VirtualEnvironmentName: "venv"

eng/pipelines/templates/steps/build-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ steps:
3232
versionSpec: '${{ parameters.PythonVersion }}'
3333

3434
- template: /eng/pipelines/templates/steps/use-venv.yml
35+
parameters:
36+
Activate: false
3537

3638
- template: set-dev-build.yml
3739
parameters:

0 commit comments

Comments
 (0)