From 9599c5a9afed1f7bb72f62c1995e59309d30f247 Mon Sep 17 00:00:00 2001 From: Konrad Jamrozik Date: Thu, 22 Dec 2022 17:42:37 -0800 Subject: [PATCH] more readme updates --- eng/common/scripts/job-matrix/README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/eng/common/scripts/job-matrix/README.md b/eng/common/scripts/job-matrix/README.md index 52e348a6dcd..ba5f4768ba6 100644 --- a/eng/common/scripts/job-matrix/README.md +++ b/eng/common/scripts/job-matrix/README.md @@ -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 @@ -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: @@ -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