-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tasks should use bound resources from TaskRuns
Before this change, Tasks were retrieving the Resources to use by looking for PipelineResources with exactly the name that the Resource is declared with in the Task. This means that the Resource binding in Pipelines (and TaskRuns) was doing absolutely nothing. Instead, we now map bound Resources inside of TaskRuns. The name of a Resource declared in a Task is a _parameter_, which we fulfill by providing the _key_ aka parameter of the Task, and the corresponding Resource reference we should use for that _key_. This allows us to use the same Task with different Resources without having to change the Task or the Resource. This was not caught by any tests because the tests were co-incidentally using the same name for the Resources and the Resource key/name/parameter in the Task. Now the tests use different names. This came up while creating example yaml for #89 - as soon as I tried to use two different git resources (one upstream, one my fork) I realized that the mapping was not working. This also partially addresses #138 by removing the `Name` field from the bindings, which is not required. This addresses part of #64 by adding templating from outputs.
- Loading branch information
1 parent
8a2b6c3
commit 429e1b1
Showing
22 changed files
with
370 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.