Pipeline: Document all locations that variable substitution is available

Created on 12 May 2020  路  8Comments  路  Source: tektoncd/pipeline

Expected Behavior

We should write down all the places that a variable can be substituted in our CRDs.

Actual Behavior

It's a bit hit-or-miss; we demonstrate some places to substitute in this section: https://github.com/tektoncd/pipeline/blob/master/docs/tasks.md#using-variable-substitution but it doesn't look like we document all of the possible locations that are supported.

Proposal

My suggestion would be to update docs/variables.md with a table of all locations in our CRDs where variables will be successfully interpolated into.

Here are a couple places in our code where we perform substitutions:

So documenting the locations would just require reading the various funcs called from these spots and recording all the fields that get modified. Not entirely sure if these are the only places that we apply replacements from though.

good first issue kindocumentation

All 8 comments

I'll look into this one this week.

/assign @psschwei

Hey @psschwei It looks like we actually already have this https://github.com/tektoncd/pipeline/blob/master/docs/variables.md 馃槰

If there's anything missing tho plz add :D otherwise maybe we should close this issue? Sorry for the confusion 馃槰 馃槰 馃槰

Just to clarify - this issue is about documenting _where_ the variables can be used. The existing variables.md contents only document _what_ the available variables are.

Thanks @sbwsg ! Looks like there is work to do here after all, sorry for the (increased) confusion @psschwei XD

No worries, thanks for the clarification!

@psschwei feel free to create PR with subset of changes if it's easier for you. There are many places variable substitutions happen at Task level, Pipeline level, etc. As a newbie to source code, might be easier to propose small changes 馃グ

@sbwsg do we consider task results substitutions as a variable substitution ? 馃 I would think so, right?

value: $(tasks.mytask.results.sum)

Yeah I would definitely consider that a variable substitution as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pritidesai picture pritidesai  路  4Comments

r0bj picture r0bj  路  3Comments

bobcatfish picture bobcatfish  路  4Comments

csantanapr picture csantanapr  路  3Comments

objectiveous picture objectiveous  路  3Comments