-
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
POC Pipeline resource interface #442
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,8 @@ package v1alpha1 | |
import ( | ||
"fmt" | ||
"strings" | ||
|
||
corev1 "k8s.io/api/core/v1" | ||
) | ||
|
||
// NewImageResource creates a new ImageResource from a PipelineResource. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. might be an opportunity to remove the Image resource till its properly implemented There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had a private chat with @bobcatfish about this. I am rephrasing @bobcatfish point here. There is value is keeping image resource because tasks can use its attributes. For eg: in templating params. |
||
|
@@ -73,3 +75,12 @@ func (s *ImageResource) Replacements() map[string]string { | |
"digest": s.Digest, | ||
} | ||
} | ||
|
||
func (s *ImageResource) GetUploadContainerSpec() ([]corev1.Container, error) { | ||
return nil, nil | ||
} | ||
func (s *ImageResource) GetDownloadContainerSpec() ([]corev1.Container, error) { | ||
return nil, nil | ||
} | ||
func (s *ImageResource) SetDestinationDirectory(path string) { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ import ( | |
|
||
"github.com/knative/pkg/apis" | ||
"github.com/knative/pkg/webhook" | ||
corev1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
|
@@ -52,6 +53,9 @@ type PipelineResourceInterface interface { | |
GetType() PipelineResourceType | ||
GetParams() []Param | ||
Replacements() map[string]string | ||
GetDownloadContainerSpec() ([]corev1.Container, error) | ||
GetUploadContainerSpec() ([]corev1.Container, error) | ||
SetDestinationDirectory(string) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i like it!! |
||
} | ||
|
||
// SecretParam indicates which secret can be used to populate a field of the resource | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to support upload for git?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that would be awesome. I don't know if I want to do that feature in this PR.