Documentation
¶
Index ¶
- type Resource
- func (s *Resource) GetInputTaskModifier(ts *pipelinev1beta1.TaskSpec, sourcePath string) (pipelinev1beta1.TaskModifier, error)
- func (s Resource) GetName() string
- func (s *Resource) GetOutputTaskModifier(ts *pipelinev1beta1.TaskSpec, sourcePath string) (pipelinev1beta1.TaskModifier, error)
- func (s Resource) GetType() resourcev1alpha1.PipelineResourceType
- func (s *Resource) GetURL() string
- func (s *Resource) Replacements() map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resource ¶
type Resource struct {
Name string `json:"name"`
Type resourcev1alpha1.PipelineResourceType `json:"type"`
// URL pointing to the pull request.
// Example: https://github.com/owner/repo/pulls/1
URL string `json:"url"`
// SCM provider (github or gitlab today). This will be guessed from URL if not set.
Provider string `json:"provider"`
// Secrets holds a struct to indicate a field name and corresponding secret name to populate it.
Secrets []resourcev1alpha1.SecretParam `json:"secrets"`
PRImage string `json:"-"`
InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify"`
}
Resource is an endpoint from which to get data which is required by a Build/Task for context.
func NewResource ¶
func NewResource(name, prImage string, r *resourcev1alpha1.PipelineResource) (*Resource, error)
NewResource create a new git resource to pass to a Task
func (*Resource) GetInputTaskModifier ¶
func (s *Resource) GetInputTaskModifier(ts *pipelinev1beta1.TaskSpec, sourcePath string) (pipelinev1beta1.TaskModifier, error)
GetInputTaskModifier returns the TaskModifier to be used when this resource is an input.
func (*Resource) GetOutputTaskModifier ¶
func (s *Resource) GetOutputTaskModifier(ts *pipelinev1beta1.TaskSpec, sourcePath string) (pipelinev1beta1.TaskModifier, error)
GetOutputTaskModifier returns a No-op TaskModifier.
func (Resource) GetType ¶
func (s Resource) GetType() resourcev1alpha1.PipelineResourceType
GetType returns the type of the resource, in this case "Git"
func (*Resource) Replacements ¶
Replacements is used for template replacement on a PullRequestResource inside of a Taskrun.
Click to show internal directories.
Click to hide internal directories.