Skip to content

Commit 73d6116

Browse files
authored
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 f8a2115 commit 73d6116

File tree

5 files changed

+27
-15
lines changed

5 files changed

+27
-15
lines changed

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

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

9090
- task: UsePythonVersion@0
9191
inputs:
92-
versionSpec: '3.8'
92+
versionSpec: '3.10'
9393

9494
- template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml
9595
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: 8 additions & 8 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,11 +47,6 @@ 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'
49-
5050
- template: /eng/pipelines/templates/steps/use-venv.yml
5151

5252
- script: |
@@ -69,8 +69,8 @@ steps:
6969
inputs:
7070
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
7171
arguments: >-
72-
"$(TargetingString)"
73-
--service="${{ parameters.ServiceDirectory }}"
72+
"$(TargetingString)"
73+
--service="${{ parameters.ServiceDirectory }}"
7474
--toxenv=sphinx
7575
--wheel_dir="$(Build.ArtifactStagingDirectory)"
7676
@@ -94,7 +94,7 @@ steps:
9494
$directoryExists = Test-Path -Path "$(Build.SourcesDirectory)/_docs"
9595
Write-Output "##vso[task.setvariable variable=DirectoryExists]$directoryExists"
9696
displayName: Check if docs directory exists
97-
97+
9898
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
9999
parameters:
100100
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
@@ -34,6 +34,11 @@ parameters:
3434
# However, please note that this variable will not ALWAYS be set. If using `build-artifacts.yml`, ensure that this variable is set AT LEAST
3535
# to "linux", otherwise the primary tasks will not be run as expected. APIStub, Docs, etc are NOT run on machines that aren't linux.
3636
steps:
37+
- task: UsePythonVersion@0
38+
displayName: 'Use Python $(PythonVersion)'
39+
inputs:
40+
versionSpec: $(PythonVersion)
41+
3742
- template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml@self
3843
parameters:
3944
PackageName: "azure-template"
@@ -47,12 +52,6 @@ steps:
4752
displayName: 'Tag scheduled builds'
4853
condition: and(eq(variables['Build.SourceBranchName'], variables['DefaultBranch']), eq(variables['Build.Reason'],'Schedule'))
4954
50-
- task: UsePythonVersion@0
51-
displayName: 'Use Python $(PythonVersion)'
52-
inputs:
53-
versionSpec: $(PythonVersion)
54-
55-
5655
- template: /eng/pipelines/templates/steps/use-venv.yml
5756
parameters:
5857
VirtualEnvironmentName: "venv"

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

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

3636
- template: /eng/pipelines/templates/steps/use-venv.yml
37+
parameters:
38+
Activate: false
3739

3840
- template: set-dev-build.yml
3941
parameters:

0 commit comments

Comments
 (0)