-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
TEP-0075: Add examples with object params and results #5144
Conversation
/kind misc |
- Added a taskrun level example that uses object param and object result. - Added a pipeline level example that uses individual variables of an object param and uses the whole object param.
/test pull-tekton-pipeline-integration-tests |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom 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 |
image: bash:latest | ||
script: | | ||
#!/usr/bin/env bash | ||
echo -n "{\"IMAGE_URL\":\"ar.com\", \"IMAGE_DIGEST\":\"sha234\"}" > $(results.object-results.path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind adding another reference to a object param key to replace ar.com
in script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sg!
metadata: | ||
name: mock-clone-task | ||
spec: | ||
params: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at examples/v1beta1/pipelineruns/alpha/pipeline-emitting-results.yaml
together, I realize another example is missing is that: a task is using a previous task's results in the params as a whole. Example with object keys: https://github.com/tektoncd/pipeline/blob/main/examples/v1beta1/pipelineruns/task_results_example.yaml and https://github.com/tektoncd/pipeline/blob/main/docs/pipelines.md#passing-one-tasks-results-into-the-parameters-or-when-expressions-of-another
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is the example for object param only. Object result (i.e. using a previous task's object result) example is in the file /pipeline-object-results.yaml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SG!
/assign @ywluogg |
/lgtm |
Changes
Added a taskrun level example that uses object param and
object result.
Added a pipeline level example that uses individual variables of an
object param and uses the whole object param.
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes