* chore: shared builder constants etc
* pretty-print the shared unknown builder error
* update builder impls to use shared defs and validators
* error and docs text formatting
* include static default short names
* comment updates and typos
* docs paths
* use the constants for the in-package builder defaults
* use builders.All but with caviat
* update root and version structure and help text
* fix: limit openshift int test with tag
* src: verbosity to constructor param
* fix misspelling
* fix merge error
* feat: completion --build flag of deploy sub-cmd
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* src: refactor
Moved functionality.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* feat: create cli prompts
* feat: display effective runtimes in prompt
replaces the static list of supported runtimes with a dynamic list of
currently installed+available runtimes; called the effective runtimes.
Used for both prompting and validation.
* feat: dynamic create help and error text
Output from create help text and the create commands now show valid
options for both language runtimes and templates.
* feat: runtime tab completion for runtmes and templates
* feat: support FUNC_PARENT_COMMAND in help
* feat: confirmation of successful create
* fix: include name in initial creation
* src: remove unnecessary comments on create name
* fix: associate prompt questions with struct members in create
* e2e: update tests for language flag
* fix: support nonexistent repositories path
Listing installed repositories considers a missing path equivalent to a
lack of installed repositories. This will change to an error when the
logic to determin default config directory, and automatically create
initial structure, is moved into the client library.
* fix: only CLI-validate when no repo override
This commit removes the Red Hat builders from the built in templates
for Go, TypeScript and Node.js, replacing them with paketo builders.
For Go, the builder is augmented with a simple buildpack that installs
the Go wrapper code and its dependencies. For TypeScript, the paketo
buildpacks oddly don't support an `npm build` step, so these templates
are also dependent on a small Boson buildpack. These buildpacks are
currently at https://github.com/lance/boson-buildpacks but should find
a home either in the boson-project organization, or the knative-sandbox
organization.
This change also slightly modifies how the Node.js and TypeScript
templates are structured, reducing the coupling between the buildpack
and a function project.
This commit includes the code in https://github.com/knative-sandbox/kn-plugin-func/pull/465
and is dependent on it in the use of manifest.yaml.
Provide sane defaults for health endpoints
Note that this will need to be documented as a requirement for
language packs that do not wish to provide explicit endpoints for
these kube health checks. In that case, the language pack should
specify these both as the root path, with a query parameter. For
example, `/?health=readiness` and `/?health=liveness`, or some other
similar construct.
Signed-off-by: Lance Ball <lball@redhat.com>
This commit adds a .builder.yaml file to each template directory. In the file
there is at the moment a single key/value pair, "default: <image>", where the
actual builder image name is <image>. Using a mapping allows the future
possibility that a user may specify a builder image by name via a flag on the
command line. For example,
```console
faas build --builder native
```
When a project is initialized, the .builder.yaml file is read, and the default
builder is saved in the project's .faas.yaml file. The .faas.yaml file is then
consulted when building an image with `faas build`. If the builder image is
specified, then the builder will use it. Otherwise, it will fallback to the
defaults. This allows developers to create custom builders, and specify them
in the configuration file.
After extracting the builder image from .builder.yaml in the project directory,
this file is deleted.
This commit also adds Verbose to the init command.