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

Document Tekton's Many Variables #2358

Merged
merged 1 commit into from Apr 9, 2020
Merged

Document Tekton's Many Variables #2358

merged 1 commit into from Apr 9, 2020

Conversation

ghost
Copy link

@ghost ghost commented Apr 9, 2020

Changes

Closes #2267

Tekton exposes a number of variables in Tasks and Pipelines that are substituted for their runtime values. The complete set of variables isn't documented in any single place.

This commit introduces a doc to try and capture all the variables in one place.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

@ghost ghost added the kind/documentation Categorizes issue or PR as related to documentation. label Apr 9, 2020
@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Apr 9, 2020
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 9, 2020
@ghost ghost removed request for abayer and dlorenc April 9, 2020 03:12
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/meow

@tekton-robot
Copy link
Collaborator

@vdemeester: cat image

In response to this:

/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 9, 2020
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this!
I think there is one missing.
It would be great to have some other doc link to this too, perhaps the main README or the task readme or both.

| `params.<param name>` | The value of the param at runtime. |
| `resources.inputs.<resource name>.path` | The path to the input resource's directory. |
| `resources.outputs.<resource name>.path` | The path to the output resource's directory. |
| `results.<result name>.path` | The path to the file where a Task's result should be written. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was possible for a Task to refer to another task results now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like:

tasks.[task-name].results.[result-name]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this is a Pipeline Task variable, which got pushed down under the PipelineResource variables since they're Task-only i think. I'll move the Pipeline variables up higher.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right, I missed that, thank you!

@ghost
Copy link
Author

ghost commented Apr 9, 2020

excellent point on linking from another doc, i'll do that.

@ghost ghost added the needs-cherry-pick Indicates a PR needs to be cherry-pick to a release branch label Apr 9, 2020
Tekton exposes a number of variables in Tasks and Pipelines
that are substituted for their runtime values. The complete
set of variables isn't documented in any single place.

This commit introduces a doc to try and capture all the
variables in one place.
@ghost
Copy link
Author

ghost commented Apr 9, 2020

I've updated with links from other docs and also moved the Pipeline Variables to the top of the doc.

@ghost
Copy link
Author

ghost commented Apr 9, 2020

/test pull-tekton-pipeline-build-tests

Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates, looking great!
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 9, 2020
@ghost
Copy link
Author

ghost commented Apr 9, 2020

/test pull-tekton-pipeline-build-tests

@tekton-robot tekton-robot merged commit 0d9818d into tektoncd:master Apr 9, 2020
@ghost ghost removed the needs-cherry-pick Indicates a PR needs to be cherry-pick to a release branch label Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit kind/documentation Categorizes issue or PR as related to documentation. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document all variables available in Tekton in one place
4 participants