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

Expand Task Param fields #190

Closed
bobcatfish opened this issue Oct 25, 2018 · 4 comments · Fixed by #205
Closed

Expand Task Param fields #190

bobcatfish opened this issue Oct 25, 2018 · 4 comments · Fixed by #205
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@bobcatfish
Copy link
Collaborator

Expected Behavior

Tasks should be reusable. When you look at a Task, it should be clear how to use it, specifically how to provide the right parameters and what they are. There should also be defaults for parameters, i.e. each Param should look like this:

  - name: DOCKERFILE_NAME
    description: The name of the Dockerfile
    default: Dockerfile
  • Description should be required
  • Default should be optional

Please also update examples.

Actual Behavior

Currently Task Params have only one field: name.

Additional Info

See knative build template docs.

Question: perhaps we want this functionality for resources as well?

@bobcatfish bobcatfish added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Oct 25, 2018
@tanner-bruce
Copy link

@bobcatfish I'll tackle this one.

tanner-bruce pushed a commit to tanner-bruce/build-pipeline that referenced this issue Oct 30, 2018
This commit adds the `Description` and `Default` fields to the
TaskParams object. Description is a mandatory field to be used for
describing what the Param is. Default is optional, and may be used to
specify a default value for the param.

Adding these fields will make the pipeline easier to understand.

Also fixes a bug in `resources.AddInputResources` where if the Task has
Inputs defined, AddInputResources assumes there *must* be one of type
GitResource, which is not necessarily the case.

Fixes tektoncd#190
@bobcatfish
Copy link
Collaborator Author

Thanks @tanner-bruce !

And like you were saying in slack, I wonder if we should add a type field back - it had seemed like we only needed string, but now it's looking like we could do with some kind of array/list type as well, e.g. for expressing multiple arguments.

@tanner-bruce
Copy link

tanner-bruce commented Oct 30, 2018

@bobcatfish want to do that as a separate issue? Seems like it warrants a discussion about syntax/implementation.

I filed #207 for design around an Array type in params

tanner-bruce pushed a commit to tanner-bruce/build-pipeline that referenced this issue Oct 30, 2018
This commit adds the `Description` and `Default` fields to the
TaskParams object. Description is a mandatory field to be used for
describing what the Param is. Default is optional, and may be used to
specify a default value for the param.

Adding these fields will make the pipeline easier to understand.

Also fixes a bug in `resources.AddInputResources` where if the Task has
Inputs defined, AddInputResources assumes there *must* be one of type
GitResource, which is not necessarily the case.

Fixes tektoncd#190
tanner-bruce pushed a commit to tanner-bruce/build-pipeline that referenced this issue Nov 1, 2018
This commit adds the `Description` and `Default` fields to the
TaskParams object. Description is a mandatory field to be used for
describing what the Param is. Default is optional, and may be used to
specify a default value for the param.

Adding these fields will make the pipeline easier to understand.

Also fixes a bug in `resources.AddInputResources` where if the Task has
Inputs defined, AddInputResources assumes there *must* be one of type
GitResource, which is not necessarily the case.

Fixes tektoncd#190
tanner-bruce pushed a commit to tanner-bruce/build-pipeline that referenced this issue Nov 1, 2018
This commit adds the `Description` and `Default` fields to the
TaskParams object. Description is a mandatory field to be used for
describing what the Param is. Default is optional, and may be used to
specify a default value for the param.

Adding these fields will make the pipeline easier to understand.

Also fixes a bug in `resources.AddInputResources` where if the Task has
Inputs defined, AddInputResources assumes there *must* be one of type
GitResource, which is not necessarily the case.

Fixes tektoncd#190
tanner-bruce pushed a commit to tanner-bruce/build-pipeline that referenced this issue Nov 1, 2018
This commit adds the `Description` and `Default` fields to the
TaskParams object. Description is a mandatory field to be used for
describing what the Param is. Default is optional, and may be used to
specify a default value for the param.

Adding these fields will make the pipeline easier to understand.

Also fixes a bug in `resources.AddInputResources` where if the Task has
Inputs defined, AddInputResources assumes there *must* be one of type
GitResource, which is not necessarily the case.

Fixes tektoncd#190
tanner-bruce pushed a commit to tanner-bruce/build-pipeline that referenced this issue Nov 1, 2018
This commit adds the `Description` and `Default` fields to the
TaskParams object. Description is a mandatory field to be used for
describing what the Param is. Default is optional, and may be used to
specify a default value for the param.

Adding these fields will make the pipeline easier to understand.

Also fixes a bug in `resources.AddInputResources` where if the Task has
Inputs defined, AddInputResources assumes there *must* be one of type
GitResource, which is not necessarily the case.

Fixes tektoncd#190
tanner-bruce pushed a commit to tanner-bruce/build-pipeline that referenced this issue Nov 1, 2018
This commit adds the `Description` and `Default` fields to the
TaskParams object. Description is a mandatory field to be used for
describing what the Param is. Default is optional, and may be used to
specify a default value for the param.

Adding these fields will make the pipeline easier to understand.

Also fixes a bug in `resources.AddInputResources` where if the Task has
Inputs defined, AddInputResources assumes there *must* be one of type
GitResource, which is not necessarily the case.

Fixes tektoncd#190
knative-prow-robot pushed a commit that referenced this issue Nov 1, 2018
This commit adds the `Description` and `Default` fields to the
TaskParams object. Description is a mandatory field to be used for
describing what the Param is. Default is optional, and may be used to
specify a default value for the param.

Adding these fields will make the pipeline easier to understand.

Also fixes a bug in `resources.AddInputResources` where if the Task has
Inputs defined, AddInputResources assumes there *must* be one of type
GitResource, which is not necessarily the case.

Fixes #190
@bobcatfish
Copy link
Collaborator Author

Thanks again @tanner-bruce ! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants