Skip to content

Commit 7702cc2

Browse files
authored
{CI} Refactor pipeline to use variable for Ubuntu pool name and upgrade to ubuntu 2204 (#533)
* Refactor pipeline to use variable for Ubuntu pool name and upgrade to ubuntu 2204 * minor fix
1 parent ce90f1c commit 7702cc2

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
variables:
2+
ubuntu_pool: 'pool-ubuntu-2204'

azure-pipelines-cli.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ trigger:
55
branches:
66
include:
77
- '*'
8+
9+
variables:
10+
- template: ${{ variables.Pipeline.Workspace }}/.azure-pipelines/templates/variables.yml
11+
812
jobs:
913
- job: ExtractMetadata
1014
displayName: 'Extract Metadata'
1115
condition: succeeded()
1216
pool:
13-
name: 'pool-ubuntu-2004'
17+
name: ${{ variables.ubuntu_pool }}
1418
steps:
1519
- task: Bash@3
1620
displayName: 'Extract Version'
@@ -30,7 +34,7 @@ jobs:
3034
dependsOn: ExtractMetadata
3135
condition: succeeded()
3236
pool:
33-
name: 'pool-ubuntu-2004'
37+
name: ${{ variables.ubuntu_pool }}
3438
steps:
3539
- task: UsePythonVersion@0
3640
displayName: 'Use Python 3.12'
@@ -54,7 +58,7 @@ jobs:
5458

5559
condition: succeeded()
5660
pool:
57-
name: 'pool-ubuntu-2004'
61+
name: ${{ variables.ubuntu_pool }}
5862
steps:
5963
- task: UsePythonVersion@0
6064
displayName: 'Use Python 3.12'
@@ -75,7 +79,7 @@ jobs:
7579

7680
- job: Unittest
7781
pool:
78-
name: 'pool-ubuntu-2004'
82+
name: ${{ variables.ubuntu_pool }}
7983
strategy:
8084
matrix:
8185
Python39:
@@ -132,7 +136,7 @@ jobs:
132136
dependsOn: BuildPythonWheel
133137
condition: succeeded()
134138
pool:
135-
name: 'pool-ubuntu-2004'
139+
name: ${{ variables.ubuntu_pool }}
136140
strategy:
137141
matrix:
138142
Python39:
@@ -164,7 +168,7 @@ jobs:
164168
dependsOn: BuildPythonWheel
165169
condition: succeeded()
166170
pool:
167-
name: 'pool-ubuntu-2004'
171+
name: ${{ variables.ubuntu_pool }}
168172
strategy:
169173
matrix:
170174
Python39:
@@ -196,7 +200,7 @@ jobs:
196200
dependsOn: BuildPythonWheel
197201
condition: succeeded()
198202
pool:
199-
name: 'pool-ubuntu-2004'
203+
name: ${{ variables.ubuntu_pool }}
200204
strategy:
201205
matrix:
202206
Python39:
@@ -228,7 +232,7 @@ jobs:
228232
dependsOn: BuildPythonWheel
229233
condition: succeeded()
230234
pool:
231-
name: 'pool-ubuntu-2004'
235+
name: ${{ variables.ubuntu_pool }}
232236
strategy:
233237
matrix:
234238
Python39:
@@ -259,7 +263,7 @@ jobs:
259263
displayName: "Performance Check on Linux"
260264
dependsOn: BuildPythonWheel
261265
pool:
262-
name: 'pool-ubuntu-2004'
266+
name: ${{ variables.ubuntu_pool }}
263267
strategy:
264268
matrix:
265269
Python39:

azure-pipelines.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ trigger:
55
branches:
66
include:
77
- '*'
8+
9+
variables:
10+
- template: ${{ variables.Pipeline.Workspace }}/.azure-pipelines/templates/variables.yml
11+
812
jobs:
913
- job: Tox
1014
condition: succeeded()
1115
pool:
12-
name: 'pool-ubuntu-2004'
16+
name: ${{ variables.ubuntu_pool }}
1317
strategy:
1418
matrix:
1519
Python39:
@@ -44,7 +48,7 @@ jobs:
4448
displayName: 'Extract Metadata'
4549
condition: succeeded()
4650
pool:
47-
name: 'pool-ubuntu-2004'
51+
name: ${{ variables.ubuntu_pool }}
4852
steps:
4953
- task: Bash@3
5054
displayName: 'Extract Version'
@@ -64,7 +68,7 @@ jobs:
6468
dependsOn: ExtractMetadata
6569
condition: succeeded()
6670
pool:
67-
name: 'pool-ubuntu-2004'
71+
name: ${{ variables.ubuntu_pool }}
6872
steps:
6973
- task: UsePythonVersion@0
7074
displayName: 'Use Python 3.9'
@@ -88,7 +92,7 @@ jobs:
8892

8993
condition: succeeded()
9094
pool:
91-
name: 'pool-ubuntu-2004'
95+
name: ${{ variables.ubuntu_pool }}
9296
steps:
9397
- task: UsePythonVersion@0
9498
displayName: 'Use Python 3.12'

0 commit comments

Comments
 (0)