diff --git a/.azure-pipelines/templates/variables.yml b/.azure-pipelines/templates/variables.yml new file mode 100644 index 00000000..478ae721 --- /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 ae5f55d0..892a1af8 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 013f3fc5..d81ba400 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.ubuntu_pool }} strategy: matrix: Python39: @@ -44,7 +48,7 @@ jobs: displayName: 'Extract Metadata' condition: succeeded() pool: - name: 'pool-ubuntu-2004' + name: ${{ variables.ubuntu_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'