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

TEP-0075: Add examples with object params and results #5144

Merged
merged 1 commit into from
Jul 18, 2022

Conversation

chuangw6
Copy link
Member

@chuangw6 chuangw6 commented Jul 15, 2022

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:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Add taskrun & pipelinerun examples that use object param and result.

@tekton-robot tekton-robot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Jul 15, 2022
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jul 15, 2022
@chuangw6
Copy link
Member Author

/kind misc

@tekton-robot tekton-robot added the kind/misc Categorizes issue or PR as a miscellaneuous one. label Jul 15, 2022
- 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.
@chuangw6
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

@dibyom
Copy link
Member

dibyom commented Jul 18, 2022

/approve

@tekton-robot
Copy link
Collaborator

[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 /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 Jul 18, 2022
image: bash:latest
script: |
#!/usr/bin/env bash
echo -n "{\"IMAGE_URL\":\"ar.com\", \"IMAGE_DIGEST\":\"sha234\"}" > $(results.object-results.path)
Copy link
Contributor

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?

Copy link
Member Author

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:
Copy link
Contributor

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

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

SG!

@ywluogg
Copy link
Contributor

ywluogg commented Jul 18, 2022

/assign @ywluogg

@ywluogg
Copy link
Contributor

ywluogg commented Jul 18, 2022

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 18, 2022
@tekton-robot tekton-robot merged commit 0c0f40e into tektoncd:main Jul 18, 2022
@ywluogg
Copy link
Contributor

ywluogg commented Jul 19, 2022

#4723

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. kind/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants