Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling Before/After Test Customization for Standard CI Pipelines #19187

Merged
merged 3 commits into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions eng/pipelines/templates/jobs/ci.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ parameters:
- name: TestMarkArgument
type: string
default: ''
- name: BeforeTestSteps
type: object
default: []
- name: AfterTestSteps
type: object
default: []
- name: BuildTargetingString
type: string
default: 'azure-*'
Expand Down Expand Up @@ -110,3 +116,7 @@ jobs:
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}

- ${{ each step in parameters.BeforeTestSteps }}:
- ${{ step }}
AfterTestSteps: ${{ parameters.AfterTestSteps }}
8 changes: 8 additions & 0 deletions eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ parameters:
- name: TestMarkArgument
type: string
default: ''
- name: BeforeTestSteps
type: object
default: []
- name: AfterTestSteps
type: object
default: []
- name: BuildTargetingString
type: string
default: 'azure-*'
Expand Down Expand Up @@ -121,6 +127,8 @@ jobs:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
TestPipeline: ${{ parameters.TestPipeline }}
TestMarkArgument: ${{ parameters.TestMarkArgument }}
BeforeTestSteps: ${{ parameters.BeforeTestSteps }}
AfterTestSteps: ${{ parameters.AfterTestSteps }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}
TestTimeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }}
ToxEnvParallel: ${{ parameters.ToxEnvParallel }}
Expand Down
8 changes: 8 additions & 0 deletions eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ parameters:
- name: TestPipeline
type: boolean
default: false
- name: BeforeTestSteps
type: object
default: []
- name: AfterTestSteps
type: object
default: []
- name: BeforePublishSteps
type: object
default: []
Expand Down Expand Up @@ -74,6 +80,8 @@ stages:
CondaArtifacts: ${{ parameters.CondaArtifacts }}
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
BeforeTestSteps: ${{ parameters.BeforeTestSteps }}
AfterTestSteps: ${{ parameters.AfterTestSteps }}
BeforePublishSteps: ${{ parameters.BeforePublishSteps }}
TestMarkArgument: ${{ parameters.TestMarkArgument }}
BuildTargetingString: $(BuildTargetingStringValue)
Expand Down