-
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
Add FileSet Resource #1285
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/feature
Categorizes issue or PR as related to a new feature.
Comments
ghost
mentioned this issue
Sep 6, 2019
A |
One use case: Pass entire event bodies from Triggers to a Pipeline |
vdemeester
added
kind/feature
Categorizes issue or PR as related to a new feature.
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
labels
Oct 14, 2019
Now that we have |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/feature
Categorizes issue or PR as related to a new feature.
Expected Behavior
Tasks that need to operate on files should be able to depend on a generic
FileSet
resource so that they can operate on Files without needing to know if the files came from git, from a configmap, from a hardcoded string, whatever.Tasks that do need extra information, e.g. a git commit, should be able to still rely on more specifically typed PipelienResources
Proposal
To create one
You can supply one of:
Other ideas for "sources":
When passed as an Input to a Task
The files to operate on will be under:
/workspace/$resourcename/
in an arbitrary directory structure.
Only the files the task needs to operate on are present in this structure.
The task should operate on everything in this directory recursively.
The task will also receieve an environment variable named: $SOMETHING (also available for interpolation)
containing a list of filenames, separated by spaces.
The goal is for users to be able to write tasks with a step like:
kubectl apply -f ${something}
and have that work correctly on a list of filenames.When produced as an Output of a Task
The task is responsible for filling a directory at:
/workspace/outputs/$resourcename
with the files.
Actual Behavior
Today in Tekton, tasks that consume files must operate on a typed Input resource, usually of Type
Git
orStorage
.This leads to a few problems:
Ideally, Tasks that operate on Files would have a more generic type of resource that can be populated from various sources, and Tasks should not need to communicate about file paths or names out-of-band.
Steps to Reproduce the Problem
For example, the golang build Task in the catalog depends on a
git
input:https://github.com/tektoncd/catalog/blob/a849fc273516b166a8c3193eab7a21f6cbd247c5/golang/build.yaml#L28-L31
This means that if a user wanted to use this Task on files that came from somewhere else, they'd need to build a new Task.
Additional Info
Written by @dlorenc in https://gist.github.com/dlorenc/58f6dae545ad4a7d0b3e8f7f508ee490
Next steps:
The text was updated successfully, but these errors were encountered: