-
Notifications
You must be signed in to change notification settings - Fork 78
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
add "init templates" cmd, used to list templates in format #334
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
e1be559
to
dc7cae2
Compare
@healthjyk please add an example output for this command |
an successful request is like: [
{
"dir": "/${userName}/.kusionup/current/templates/external/code-city",
"name": "code-city",
"projectName": "code-city",
"description": "Code City metaphor for visualizing Go source code in 3D.",
"quickstart": "kusion compile main.k -Y ci-test/settings.yaml",
"projectFields": [
{
"name": "AppName",
"description": "App name. Default to 'gocity'.",
"type": "string",
"default": "gocity"
},
{
"name": "ContainerPort",
"description": "The number of port to expose on the container's IP address.",
"type": "int",
"default": 4000
},
{
"name": "ServicePort",
"description": "The port that will be exposed by this service.",
"type": "int",
"default": 4000
}
],
"stacks": [
{
"name": "dev",
"fields": [
{
"name": "Image",
"description": "Docker image address of gocity. Default to 'yuanhao1223/gocity:latest'.",
"type": "string",
"default": "howieyuen/gocity:latest"
}
]
}
]
}
] |
bf8ef7e
to
84e16bf
Compare
Pull Request Test Coverage Report for Build 4915161384
💛 - Coveralls |
The error message should output to stderr, but now the wrong git repo url will result in an error ouput in stdout. :
|
I'll merge this PR. please resolve the stderr and subcommand name problems in a separate PR. |
What type of PR is this?
feature
What this PR does / why we need it:
list init templates from local or online, support json format. Hence, user can parse the specific elements of the templates.
Which issue(s) this PR fixes:
Fixes #265
Special notes for your reviewer:
If the cmd failed, the output is not in json format, even if "--output=json" is specified.
Does this PR introduce a user-facing change?
Additional documentation e.g., design docs, usage docs, etc.: