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

An example in the taskrun doc is not runnable #1858

Merged
merged 1 commit into from Jan 13, 2020
Merged

An example in the taskrun doc is not runnable #1858

merged 1 commit into from Jan 13, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jan 13, 2020

This commit fixes #1855 - an example in the taskrun doc is not runnable.

Two changes were required to make this example in docs/taskruns.md
runnable:

  1. "cat README.md" needed to be updated to "cat workspace/README.md"
    because the git resource is checked out to /workspace/workspace

  2. The TaskRun needed to be moved from above the resource and task
    declarations to be the last resource in the document.

As an added bonus I've updated the example to use the script field
instead of bash -c $(args).

Submitter Checklist

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

@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Jan 13, 2020
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 13, 2020
@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 Jan 13, 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.

Nice, thank you!
I would prefer to keep unrelated changes into a different PR.

go.mod Outdated
@@ -4,6 +4,7 @@ go 1.13

require (
cloud.google.com/go v0.47.0 // indirect
cloud.google.com/go/storage v1.0.0
Copy link
Member

Choose a reason for hiding this comment

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

This change seems to be unrelated

go.mod Outdated
@@ -51,7 +52,7 @@ require (
golang.org/x/sys v0.0.0-20191119060738-e882bf8e40c2 // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
golang.org/x/tools v0.0.0-20191118222007-07fc4c7f2b98 // indirect
google.golang.org/api v0.10.0 // indirect
google.golang.org/api v0.10.0
Copy link
Member

Choose a reason for hiding this comment

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

Ditto

- /bin/bash
args:
- "cat README.md"
script: cat workspace/README.md
Copy link
Member

Choose a reason for hiding this comment

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

Nice :)

This commit fixes #1855 - an example in the taskrun doc is not runnable.

Two changes were required to make this example in docs/taskruns.md
runnable:

1. "cat README.md" needed to be updated to "cat workspace/README.md"
because the git resource is checked out to /workspace/workspace

2. The TaskRun needed to be moved from above the resource and task
declarations to be the last resource in the document.

As an added bonus I've updated the example to use the script field
instead of `bash -c $(args)`.
@ghost
Copy link
Author

ghost commented Jan 13, 2020

I would prefer to keep unrelated changes into a different PR.

No problem, I've removed the changes to go.mod

Copy link
Member

@dibyom dibyom left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 13, 2020
@tekton-robot tekton-robot merged commit a1e74a2 into tektoncd:master Jan 13, 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 lgtm Indicates that a PR is ready to be merged. 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.

The provided example for Task and TaskRun doesn't work
4 participants