From 723eef7b3fd24a71d94f560f8205e80e66c01ea2 Mon Sep 17 00:00:00 2001 From: ZelinWang Date: Wed, 15 Oct 2025 14:25:40 +0800 Subject: [PATCH 1/2] Refactor pipeline to use variable for Ubuntu pool name and upgrade to ubuntu 2204 --- .azure-pipelines/templates/variables.yml | 2 ++ azure-pipelines-cli.yml | 22 +++++++++++++--------- azure-pipelines.yml | 12 ++++++++---- 3 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 .azure-pipelines/templates/variables.yml diff --git a/.azure-pipelines/templates/variables.yml b/.azure-pipelines/templates/variables.yml new file mode 100644 index 000000000..478ae7210 --- /dev/null +++ b/.azure-pipelines/templates/variables.yml @@ -0,0 +1,2 @@ +variables: + ubuntu_pool: 'pool-ubuntu-2204' diff --git a/azure-pipelines-cli.yml b/azure-pipelines-cli.yml index ae5f55d0c..892a1af89 100644 --- a/azure-pipelines-cli.yml +++ b/azure-pipelines-cli.yml @@ -5,12 +5,16 @@ trigger: branches: include: - '*' + +variables: +- template: ${{ variables.Pipeline.Workspace }}/.azure-pipelines/templates/variables.yml + jobs: - job: ExtractMetadata displayName: 'Extract Metadata' condition: succeeded() pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.ubuntu_pool }} steps: - task: Bash@3 displayName: 'Extract Version' @@ -30,7 +34,7 @@ jobs: dependsOn: ExtractMetadata condition: succeeded() pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.ubuntu_pool }} steps: - task: UsePythonVersion@0 displayName: 'Use Python 3.12' @@ -54,7 +58,7 @@ jobs: condition: succeeded() pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.ubuntu_pool }} steps: - task: UsePythonVersion@0 displayName: 'Use Python 3.12' @@ -75,7 +79,7 @@ jobs: - job: Unittest pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.ubuntu_pool }} strategy: matrix: Python39: @@ -132,7 +136,7 @@ jobs: dependsOn: BuildPythonWheel condition: succeeded() pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.ubuntu_pool }} strategy: matrix: Python39: @@ -164,7 +168,7 @@ jobs: dependsOn: BuildPythonWheel condition: succeeded() pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.ubuntu_pool }} strategy: matrix: Python39: @@ -196,7 +200,7 @@ jobs: dependsOn: BuildPythonWheel condition: succeeded() pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.ubuntu_pool }} strategy: matrix: Python39: @@ -228,7 +232,7 @@ jobs: dependsOn: BuildPythonWheel condition: succeeded() pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.ubuntu_pool }} strategy: matrix: Python39: @@ -259,7 +263,7 @@ jobs: displayName: "Performance Check on Linux" dependsOn: BuildPythonWheel pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.ubuntu_pool }} strategy: matrix: Python39: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 013f3fc52..a1c3f1001 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,11 +5,15 @@ trigger: branches: include: - '*' + +variables: +- template: ${{ variables.Pipeline.Workspace }}/.azure-pipelines/templates/variables.yml + jobs: - job: Tox condition: succeeded() pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.windows_pool }} strategy: matrix: Python39: @@ -44,7 +48,7 @@ jobs: displayName: 'Extract Metadata' condition: succeeded() pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.windows_pool }} steps: - task: Bash@3 displayName: 'Extract Version' @@ -64,7 +68,7 @@ jobs: dependsOn: ExtractMetadata condition: succeeded() pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.ubuntu_pool }} steps: - task: UsePythonVersion@0 displayName: 'Use Python 3.9' @@ -88,7 +92,7 @@ jobs: condition: succeeded() pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.ubuntu_pool }} steps: - task: UsePythonVersion@0 displayName: 'Use Python 3.12' From 5b0330acfd65dc99928e6b59b045c9c0e5969372 Mon Sep 17 00:00:00 2001 From: ZelinWang Date: Wed, 15 Oct 2025 14:29:45 +0800 Subject: [PATCH 2/2] minor fix --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a1c3f1001..d81ba400b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,7 +13,7 @@ jobs: - job: Tox condition: succeeded() pool: - name: ${{ variables.windows_pool }} + name: ${{ variables.ubuntu_pool }} strategy: matrix: Python39: @@ -48,7 +48,7 @@ jobs: displayName: 'Extract Metadata' condition: succeeded() pool: - name: ${{ variables.windows_pool }} + name: ${{ variables.ubuntu_pool }} steps: - task: Bash@3 displayName: 'Extract Version'