Skip to content

Commit

Permalink
more readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Jamrozik committed Dec 23, 2022
1 parent 9ab44f4 commit 9599c5a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions eng/common/scripts/job-matrix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ to the definition, which is possible because [matrix can accept a runtime expres
Assume you have a job defined in azure pipelines yaml file. You want to run
it in a matrix, leveraging the matrix generator functionality.

To do this, you will need to create another pipeline definition that will
reference your job definition in `JobTemplatePath` and generate the matrix
based on one or more matrix json configs referenced in `MatrixConfigs`.
That pipeline will use as template the definition
To do this, you will need to create another job that will reference your job
definition in its `JobTemplatePath` parameter and generate the matrix
based on one or more matrix json configs referenced in its `MatrixConfigs` parameter.
That job will use as template the definition
[`archetype-sdk-tests-generate.yml`](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/pipelines/templates/jobs/archetype-sdk-tests-generate.yml).

### Matrix generator usage example
Expand All @@ -56,7 +56,10 @@ And the path of matrix config you want to use is:

* [`eng/common/scripts/job-matrix/samples/matrix.json`](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/scripts/job-matrix/samples/matrix.json)

Here is how you can wire up together your job with the matrix generation logic:
If now you want to run the job defined in `matrix-job-sample.yml` in a matrix, with all
the matrix configuration instances generated with appropriate values by matrix generator
based on `matrix.json`, you need to introduce a job using the `archetype-sdk-tests-generate.yml` template that
will set up your job with the matrix config. It can look like this:

``` yaml
jobs:
Expand Down Expand Up @@ -84,7 +87,7 @@ jobs:
PreGenerationSteps: []
```
To see an example of a complete definition leveraging the matrix logic, see
To see an example of a complete pipeline definition with a job that runs your job using matrix generator, refer to
[`/eng/common/scripts/job-matrix/samples/matrix-test.yml`](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/scripts/job-matrix/samples/matrix-test.yml).

### A note regarding PreGenerationSteps
Expand Down

0 comments on commit 9599c5a

Please sign in to comment.