Adds a tool to create a simple task template - #739
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
vdemeester
left a comment
There was a problem hiding this comment.
/cc @tektoncd/catalog-maintainers
00a675f to
a00cbac
Compare
|
/hold cancel |
|
/test pull-tekton-catalog-integration-tests |
chmouel
left a comment
There was a problem hiding this comment.
Some nits about code, maybe you would like to do a class and some argpass for passing default argument, you can maybe get inspiration from this script if you want to snatch the parse_args/main and class function
| json_object = json.loads(jsondata) | ||
|
|
||
| # Type of resource | ||
| type = input("Enter type of resource: task/pipeline: ").lower() |
There was a problem hiding this comment.
type is normally a reserver word in python :D
| metadata["annotations"]["tekton.dev/pipelines.minVersion"] = minPipelineVersion | ||
| metadata["annotations"]["tekton.dev/displayName"] = displayName | ||
|
|
||
| except OSError as error: |
There was a problem hiding this comment.
why don't you just os.path.exists the file instead of a try block?
| metadata["annotations"]["tekton.dev/displayName"] = displayName | ||
|
|
||
| except OSError as error: | ||
| print("""Resource with %s and version %s already exists""" % |
|
I think ideally it would be best to include a README template as well and have a few argument, we could as plug inside cookicutter which would get us a lot of lifting : https://github.com/cookiecutter/cookiecutter For example for a default template on django https://github.com/pydanny/cookiecutter-django Another idea, would be to just do this in go inside catlin (with go 1.5 embed stuff), having the validator near the linter (ie: same repo) is not a bad idea i think, so we can update easily the lint and the default template in a commit, |
| optional: true # Optional value of the workspace | ||
|
|
||
| params: | ||
| - name: '' # Name of parms |
There was a problem hiding this comment.
small typo
| - name: '' # Name of parms | |
| - name: '' # Name of param |
- This patch adds a tool which help to create
a manifest template for task/pipeline based
on Tekton Catalog Organization Proposal
Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com>
|
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
|
/remove-lifecycle stale |
|
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
|
/remove-lifecycle stale |
|
since we are moving all these in |
Signed-off-by: Puneet Punamiya ppunamiy@redhat.com
Changes
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
File path follows
<kind>/<name>/<version>/name.yamlHas
README.mdat<kind>/<name>/<version>/README.mdHas mandatory
metadata.labels-app.kubernetes.io/versionthe same as the<version>of the resourceHas mandatory
metadata.annotationstekton.dev/pipelines.minVersionmandatory
spec.descriptionfollows the conventionSee the contribution guide
for more details.