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

why don`t make step as a kind of resource,just like task,pipeline, so we can use step at anywhere too. #3009

Closed
gitupxm163 opened this issue Jul 24, 2020 · 4 comments

Comments

@gitupxm163
Copy link

why don`t make step as a kind of resource,just like task,pipeline, so we can use step at anywhere too.

@danielhelfand
Copy link
Member

@gitupxm163 There is actually an open issue for this (#1260). I unfortunately never got around to putting together a proposal for it, but there has been some activity around it if you would like to weigh in on the discussion. I think the original thought process when creating Tekton would be that Tasks would be the easiest way to reuse resources as mentioned in the issue. However, I also see the validity in making steps reusable via some type of ref property. Please feel free to add any use cases or ideas you have in the original issue.

@pritidesai
Copy link
Member

pritidesai commented Jul 24, 2020

@gitupxm163 @danielhelfand trying to understand the use case and the value this would add. Will your use case suffice by creating a script and reusing it:

steps:
- image: ubuntu
  script: |
    #!/usr/bin/env bash
    /workspace/path-to-script/my-script.sh 

Here, my-script.sh can be part of the GitHub repo and the repo is cloned into workspace using git-clone.

@ghost
Copy link

ghost commented Jul 24, 2020

I'm going to close this as a duplicate of #1260.

@ghost ghost closed this as completed Jul 24, 2020
@danielhelfand
Copy link
Member

@pritidesai I think the main issue is the design of Tekton itself is supposed to promote reusability, and yet step properties need to be fully written out as part of a Task instead allowing them to be easily shared a reused.

Why should a user need to define this step's image, command or script, resource requests/limits, securityContext, etc. again if a step already exists and has these properties defined? I think steps should somewhat mirror the design of Tasks in that they should be able to accept values at run time and be easily shared via a ref property. It's really in my mind about promoting DRY and reducing copy and paste as a practice for reusing steps.

That and the ability to easily define a step that runs a script or quick command without having to create a whole Task definition would also be interesting.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants