-
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
Allow resourceSpec within Pipeline definitions #2284
Comments
Just wanted to clarify :- you are able to use a I'm not 100% clear on the use case for putting a resourceSpec directly into a Pipeline. Could you describe a bit more the problem you're trying to solve? |
Hi @sbwsg sorry for the late reply... just let me try to explain my use case; First, just clarify I am using tekton triggers to integrate github + tekton, so pipelineruns are managed by triggers and I just can play with paremeters in the request. to template the pipeline... Got 1 project with my source code for my app: https://github.com/org/app/source-code.git I configured the webhook at source code project, so it will be executed on every push there... My pipeline just: build code, build the image, push the image and finally deploy... to deploy it is required to clone the serving project (which contains the manifests).... Binding parameters with triggers does not support any kind of string manipulation...so I can not get the url of the serving project. With my previous example I can use the source code project url ... do some manipulation (one task) and then use it as input in other task, specially convenient as git resource. But to do this approach I require this resourceSpec at Pipeline definition. Hope this helps to understand, please let me know if you have any other suggestions. |
Just found this and this issue regarding not promoting pipeline resources to beta so a task equivalence is released... This will fit totally in my use case, so maybe there is no point to evolve pipeline resources |
The git pipeline resource does not allow for any use case beyond a basic "fetch",. There are also some hacks in place, including git reset --hard when checkout fails directly on the master branch, etc, which leads to inconsistent behavior (see tektoncd#2282). The end result is that most users end up creating their own custom containers for fetching and checking out what they need. This change makes the git resource much more extensible, via an optional refspec parameter. This change should be fully backward compatible w.r.t to revision parameter EXCEPT the ability to fetch git commit short hashes (according to the e2e tests) - Adds ability to checkout older commit hashes on a particular ref chain (when fetch via commit SHA is not enabled on the server) - Adds ability to fetch several other refs (for example, refs/tags) alongside the main revision - Provides resolution for tektoncd#2282 - If the user needs to checkout a branch, they must specify the appropriate refspec and revision as the ref of the branch. There was no way to do this in the original implementation - Fixes bug reported in tektoncd#2282 by ensuring the revision is always checked out on a detached HEAD when specified w/o refspec - Fixes bug - depth parameter is not passed to git submodule update, leading to unnecessary data transfer - Fixes bug --recurse-submodules is appended to the fetch command even when the user specified submodule: "false", leading to unnecessary data transfer Fixes tektoncd#2284
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Expected Behavior
Allow using resourceSpec within pipeline definitions. The use case is related to runtime params, it is expected to use as a task input resource (git) with a parameter resulting from a previous task within the pipeline.
Example:
Actual Behavior
Get an error when creating the pipeline:
Additional Info
0.10.1
The text was updated successfully, but these errors were encountered: