Skip to content

Instantly share code, notes, and snippets.

@pt033302
Last active April 27, 2020 09:04
Show Gist options
  • Save pt033302/9f061fb5571da0e1a76e6f543eb8f123 to your computer and use it in GitHub Desktop.
Save pt033302/9f061fb5571da0e1a76e6f543eb8f123 to your computer and use it in GitHub Desktop.
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: read-task
spec:
inputs:
params:
- name: FILENAME
resources:
- name: source
type: git
steps:
- name: read-file-content
image: ubuntu
script: 'cat $(inputs.resources.source.path)/$(inputs.params.FILENAME)'
@pt033302
Copy link
Author

pt033302 commented Apr 27, 2020

  1. start taskrun using using tkn-cli
 tkn task start read-task -i=source=my-resource -p=FILENAME=docs/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment