From aca22235a5a48b752602fa79b797bdbf4b2605f9 Mon Sep 17 00:00:00 2001 From: Yawen Luo Date: Tue, 17 May 2022 15:22:42 -0400 Subject: [PATCH] align param reference as a whole in 0076 and 0075 to address https://github.com/tektoncd/pipeline/issues/4879 --- teps/0076-array-result-types.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/teps/0076-array-result-types.md b/teps/0076-array-result-types.md index 042c8a0e5..178b998ef 100644 --- a/teps/0076-array-result-types.md +++ b/teps/0076-array-result-types.md @@ -452,8 +452,27 @@ tasks: Additionally, array results can be passed directly to Tasks which take arrays as parameters using [the `[*]` variable replacement syntax](https://github.com/tektoncd/pipeline/blob/main/docs/tasks.md#substituting-array-parameters). -For example: - +For example, when params `update-all-environments` in array type is substituted with another array type `tasks.get-environments.results.environments`: +```yaml +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +... +spec: +tasks: + - name: update-all-environments + params: + - name: environments + value: $(tasks.get-environments.results.environments[*]) +``` +What we will get will be: +``` +params: + - name: environments + value: + - 'value1' + - 'value2' +``` +Another example will be thw following if `tasks.get-environments.results.environments` and `environments` are both arrays of strings: ```yaml apiVersion: tekton.dev/v1beta1 kind: Pipeline