Skip to content
4 changes: 4 additions & 0 deletions eng/pipelines/templates/jobs/ci.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ parameters:
- name: ServiceDirectory
type: string
default: not-specified
- name: TestProxy
type: boolean
default: false
- name: Artifacts
type: object
default: []
Expand Down Expand Up @@ -52,3 +55,4 @@ jobs:
parameters:
Artifacts: ${{ parameters.Artifacts }}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
TestProxy: ${{ parameters.TestProxy }}
4 changes: 4 additions & 0 deletions eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ parameters:
- name: TestPipeline
type: boolean
default: false
- name: TestProxy
type: boolean
default: false
- name: ServiceDirectory
type: string
default: not-specified
Expand Down Expand Up @@ -76,3 +79,4 @@ jobs:
AdditionalParameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Artifacts: ${{ parameters.Artifacts }}
TestProxy: ${{ parameters.TestProxy }}
7 changes: 6 additions & 1 deletion eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ parameters:
- name: ServiceDirectory
type: string
default: not-specified
- name: TestProxy
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

down below we call into ci.yml. We need to add additional parameter so the call looks like this:

      - template: /eng/pipelines/templates/jobs/ci.yml
        parameters:
          ServiceDirectory: ${{ parameters.ServiceDirectory }}
          TestProxy: ${{ parameterse.TestProxy }}
          Artifacts: ${{ parameters.Artifacts }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameters are compile-time constants. So technically it'll work if we miss adding it to each level of templates, but it'll be super confusing to debug. Better to pass all the way through.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IN jobs/ci.yml, we need to add the parameter (and then pass it to ci.tests.yml -> tests.yml)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it look good now?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! At least, I think so :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it look good now?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah. seems reasonable. now let's see what breaks 👍

type: boolean
default: false
- name: IncludeRelease
type: boolean
default: true
Expand Down Expand Up @@ -42,7 +45,8 @@ stages:
jobs:
- template: /eng/pipelines/templates/jobs/ci.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
TestProxy: ${{ parameters.TestProxy }}
Artifacts: ${{ parameters.Artifacts }}
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
Expand All @@ -66,6 +70,7 @@ stages:
parameters:
DependsOn: Build
ServiceDirectory: ${{ parameters.ServiceDirectory }}
TestProxy: ${{ parameters.TestProxy }}
Artifacts: ${{ parameters.Artifacts }}
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
Expand Down
4 changes: 4 additions & 0 deletions eng/pipelines/templates/steps/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parameters:
Artifacts: []
ServiceDirectory: not-specified
TestProxy: false

steps:
- template: /eng/common/pipelines/templates/steps/verify-agent-os.yml
Expand All @@ -25,6 +26,9 @@ steps:

- template: ../steps/use-node-test-version.yml

- ${{ if eq(parameters.TestProxy, true) }}:
- template: /eng/common/testproxy/test-proxy-tool.yml

# Option "-p max" ensures parallelism is set to the number of cores on all platforms, which improves build times.
# The default on Windows is "cores - 1" (microsoft/rushstack#436).
- script: |
Expand Down
1 change: 1 addition & 0 deletions sdk/test-utils/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ extends:
parameters:
ServiceDirectory: test-utils
IncludeRelease: false
TestProxy: true
Artifacts:
- name: azure-tools-test-recorder
safeName: azuretoolstestrecorder