-
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 Image Output Resources #216
Comments
While talking with @jonjohnsonjr about tektoncd#216 I wanted to show him an example of a Pipeline wherein there are Tasks that output Images Resources, which are then used as inputs for subsequent Tasks. Our examples Pipelines were meant to do that, but unfortunately when I looked at them, I realized these were not actually hooked up properly. The Tasks were not actually using the Images that were built by previous Tasks, so I have updated them to do that. I also discovered that the templating was incorrect (#108 - adding tests for these examples - and tektoncd#212 - making sure templated variables are actually used - can't come quickly enough!) so I've updated that in the examples as well.
While talking with @jonjohnsonjr about tektoncd#216 I wanted to show him an example of a Pipeline wherein there are Tasks that output Images Resources, which are then used as inputs for subsequent Tasks. Our examples Pipelines were meant to do that, but unfortunately when I looked at them, I realized these were not actually hooked up properly. The Tasks were not actually using the Images that were built by previous Tasks, so I have updated them to do that. I also discovered that the templating was incorrect (#108 - adding tests for these examples - and tektoncd#212 - making sure templated variables are actually used - can't come quickly enough!) so I've updated that in the examples as well.
While talking with @jonjohnsonjr about tektoncd#216 I wanted to show him an example of a Pipeline wherein there are Tasks that output Images Resources, which are then used as inputs for subsequent Tasks. Our examples Pipelines were meant to do that, but unfortunately when I looked at them, I realized these were not actually hooked up properly. The Tasks were not actually using the Images that were built by previous Tasks, so I have updated them to do that. I also discovered that the templating was incorrect (#108 - adding tests for these examples - and tektoncd#212 - making sure templated variables are actually used - can't come quickly enough!) so I've updated that in the examples as well.
While talking with @jonjohnsonjr about tektoncd#216 I wanted to show him an example of a Pipeline wherein there are Tasks that output Images Resources, which are then used as inputs for subsequent Tasks. Our examples Pipelines were meant to do that, but unfortunately when I looked at them, I realized these were not actually hooked up properly. The Tasks were not actually using the Images that were built by previous Tasks, so I have updated them to do that. I also discovered that the templating was incorrect (#108 - adding tests for these examples - and tektoncd#212 - making sure templated variables are actually used - can't come quickly enough!) so I've updated that in the examples as well.
While talking with @jonjohnsonjr about #216 I wanted to show him an example of a Pipeline wherein there are Tasks that output Images Resources, which are then used as inputs for subsequent Tasks. Our examples Pipelines were meant to do that, but unfortunately when I looked at them, I realized these were not actually hooked up properly. The Tasks were not actually using the Images that were built by previous Tasks, so I have updated them to do that. I also discovered that the templating was incorrect (#108 - adding tests for these examples - and #212 - making sure templated variables are actually used - can't come quickly enough!) so I've updated that in the examples as well.
Maybe this belongs in #124, but it's specific to images. I'd like to offer two design ideas based on Source-to-URL use cases:
|
At the moment the output_resource module unconditionally adds a copy step for every output resource in the taskrun. However not every output resource will generate content to be copied. Limit the copy to PipelineResourceTypeStorage for now. This is meant as a hotfix for bug tektoncd#401 until an implementation of the image output resource is available via tektoncd#216. Until image resource output is implemented, any consumer won't have guarantee that the image has been actually built and pushed, and won't know the hash of the created image.
At the moment the output_resource module unconditionally adds a copy step for every output resource in the taskrun. However not every output resource will generate content to be copied. Limit the copy to Storage and Git outoputs for now. This is meant as a hotfix for bug tektoncd#401 until an implementation of the image output resource is available via tektoncd#216. Until image resource output is implemented, any consumer won't have guarantee that the image has been actually built and pushed, and won't know the hash of the created image.
At the moment the output_resource module unconditionally adds a copy step for every output resource in the taskrun. However not every output resource will generate content to be copied. Limit the copy to Storage and Git outoputs for now. This is meant as a hotfix for bug tektoncd#401 until an implementation of the image output resource is available via tektoncd#216. Until image resource output is implemented, any consumer won't have guarantee that the image has been actually built and pushed, and won't know the hash of the created image.
At the moment the output_resource module unconditionally adds a copy step for every output resource in the taskrun. However not every output resource will generate content to be copied. Limit the copy to Storage and Git outoputs for now. This is meant as a hotfix for bug #401 until an implementation of the image output resource is available via #216. Until image resource output is implemented, any consumer won't have guarantee that the image has been actually built and pushed, and won't know the hash of the created image.
If no-one else is looking at this I can give it a go and propose a design. Is there a special template to be used? Or any google doc should be fine? |
@afrittoli I think any google doc should be fine at start, but we may want to have a special template in the near future (maybe we do cc @bobcatfish @imjasonh ?) |
@shashwathi @bobcatfish In the description of this issue it talks about generic verification hooks to be introduced by #124; even though #124 is closed it doesn't seem to me that they have been implemented yet. Is that right? Is there a design for those yet or anyone working on them, or shall I include that in the design for this #216? |
Cool cool. As for "tags" (see also "labels" or "annotations" (I know annotations in k8s are even more heavily utilitized)), hopefully we can make reuse of keys like https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys and the label-schema.org effort. |
Added examples to the description! |
/assign |
Is there something still missing here from the current implementation? |
This is intended to be a workaround for tektoncd/pipeline#216. The `resourcesResoult` field is proposed to be removed in pipeline 0.9, where this Task will no longer work.
This is intended to be a workaround for tektoncd/pipeline#216. The `resourcesResoult` field is proposed to be removed in pipeline 0.9, where this Task will no longer work.
@afrittoli if I understand well, the digest is exposed in the Are you still planning to update the image resource with the digest? |
The digest should be available for the next |
Is it supposed to pass the
The
|
@slowr I don't think it's working atm. I had to deploy a intermediate task to do this. See here https://github.com/nlewo/poc-tekton#deploy-tasks for details and example. |
Closing this in favor of #1673 since we're redesigning all the PipelineResources (including this one) as part of that. |
Expected Behavior
If a Task declares that it produces an image output:
This should leverage the design already fleshed out in knative build artifact design and the work being added to
go-containerregistry
in google/go-containerregistry#209 and google/go-containerregistry#261 (+ @jonjohnsonjr )Actual Behavior
Steps to Reproduce the Problem
Success case
Tasks:
Pipeline:
"${inputs.resources.image.url}@${inputs.resources.image.digest}"
but the digest will be empty so it will begcr.io/christiewilson-catfactory/leeroy-web@
(instead ofgcr.io/christiewilson-catfactory/leeroy-web@123456somedigest789
)Error case
This means if you were relying on your pipeline to produce the image, but you made a mistake and the image was never published, you may never notice!
Additional Info
The text was updated successfully, but these errors were encountered: