Skip to content
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

Provide manual step to create PipelineResources. #560

Closed
sudhirverma opened this issue Dec 31, 2019 · 5 comments
Closed

Provide manual step to create PipelineResources. #560

sudhirverma opened this issue Dec 31, 2019 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@sudhirverma
Copy link

currently, there is an interactive way to create a pipelineresources.

for example:

sudhirverma@Sudhirs-MacBook-Pro vscode-tekton % tkn res create
? Enter a name for a pipeline resource : xyz
? Select a resource type to create : git
? Enter a value for url :  https://github.com/openshift/pipelines-tutorial
? Enter a value for revision :  
New git resource "xyz" has been created

there should bee a way to create resources manually.

for example:

for creating git pipelineresources: tkn create -pipelinename 'xyz' -resourcetype 'git' -url 'githubUrl' -revision 'revision'
and the same type of command for 
 cloudEvent, cluster, git, image, pullRequest, storage
@piyush-garg
Copy link
Contributor

/kind feature

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 31, 2019
@danielhelfand
Copy link
Member

danielhelfand commented Dec 31, 2019

@sudhirverma Thanks for opening this issue. Would tkn resource create -f satisfy this use case? It allows you to create pipeline resources from a local or remote file of a pipeline resource. It was introduced in v0.6.0.

tkn resource create

Examples:
  
  # Creates new PipelineResource as per the given input
	tkn resource create -n namespace
	
  # Create a PipelineResource defined by foo.yaml in namespace 'bar'
	tkn resource create -f foo.yaml -n bar

@sudhirverma
Copy link
Author

Hi, @danielhelfand when I am creating the resource from ymal.

for example:

tkn resource create -f pipeline/resources.yaml
resources.yaml is https://github.com/openshift/pipelines-tutorial/blob/master/pipeline/resources.yaml

output:
sudhirverma@Sudhirs-MacBook-Pro pipelines-tutorial % tkn resource create -f pipeline/resources.yaml 
PipelineResource created: api-repo

in resources.yaml there are four different types of PipelineResource but it creates only one while running the command tkn resource create -f pipeline/resources.yaml

cc: @dgolovin and @evidolob

@danielhelfand
Copy link
Member

@sudhirverma Yes, so we do not at this time support multi resource file definitions. You would have to define each file individually and run tkn resource create -f for each. But I see your point and that was an overlook on our part that we should address. I think we should close this issue and open a new one around supporting multi resource file definitions.

@danielhelfand
Copy link
Member

We have two issues open to replace this: #574 and #575. My personal preference is that we move away from a resource-specific creation approach and have create/apply be top level commands (e.g. tkn create versus having a create command for each resource).

Thanks for your comment in this issue though as it helped point out a big area of improvement for us. Feel free to weigh in on both of these issues to help push us in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants