Skip to content

Commit

Permalink
Move global variable to the pipeline level (#18288)
Browse files Browse the repository at this point in the history
To ensure we always include the global variables in all
our pipeline jobs and stages we should import the variables
at the highest pipeline level to ensure we don't miss setting
these variables in any jobs.
  • Loading branch information
weshaggard authored Jan 29, 2021
1 parent e12cbc6 commit d9ad1ca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
6 changes: 0 additions & 6 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ parameters:

jobs:
- job: Build
variables:
- template: ../variables/globals.yml
pool:
name: ${{ parameters.WindowsPool }} # Comment this line back-out to switch to public pools.
# vmImage: windows-2019 # Comment this line back-in to switch to public pools.
Expand Down Expand Up @@ -97,8 +95,6 @@ jobs:

- job: "Analyze"
condition: and(succeededOrFailed(), ne(variables['Skip.Analyze'], true))
variables:
- template: ../variables/globals.yml
pool:
name: ${{ parameters.LinuxPool }}
vmImage:
Expand Down Expand Up @@ -151,8 +147,6 @@ jobs:
- job: "Test"
timeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }}
condition: and(succeededOrFailed(), ne(variables['Skip.Test'], true))
variables:
- template: ../variables/globals.yml
strategy:
maxParallel: $[ variables['MaxParallelTestJobs'] ]
matrix:
Expand Down
1 change: 0 additions & 1 deletion eng/pipelines/templates/jobs/archetype-sdk-tests-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
matrix: $[ ${{ parameters.Matrix }} ]

variables:
- template: ../variables/globals.yml
# ServiceDirectory references must get passed down by the caller as variable references
- name: ServiceDirectory
value: ${{ parameters.ServiceDirectory }}
Expand Down
3 changes: 3 additions & 0 deletions eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ parameters:
type: number
default: 60

variables:
- template: ../variables/globals.yml

stages:
- stage: Build
jobs:
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/templates/stages/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ parameters:
pathToPublish: '$(Build.ArtifactStagingDirectory)/SessionRecords'
artifactName: SessionRecords

variables:
- template: ../variables/globals.yml

stages:
- ${{ each cloud in parameters.CloudConfig }}:
Expand Down

0 comments on commit d9ad1ca

Please sign in to comment.