Commit Graph

28 Commits

Author SHA1 Message Date
Matej Vasek c2b4a304bd
feat: ability for users to specify custom builders (#147)
* refactor: functionWithOverrides
* feat: custom Buildpacks builder
* fix: namespaces
2020-10-05 10:29:51 -04:00
Lance Ball d6e131f915
feat: set builder images in templates and .faas.yaml (#136)
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.
2020-09-24 11:41:34 -04:00
Zbynek Roubalik 025862689e
feat: decouple function name from function domain (#127)
* decouple function name from function domain

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-09-24 09:52:22 -04:00
Lance Ball 566d8f9255 feat: default to no confirmation prompts for CLI commands
The CLI commands all printed confirmation prompts for the various flags
they exposed. This commit modifies that logic, so that there is no longer
a `-y` flag, but instead a `--confirm` or `-c` flag for each command, and
prompts are only displayed if using this flag. In most cases, the derived
values are printed even if not prompted for.

In call cases where the user is prompted, I have removed the "Verbose"
prompt, as that seems less like a configuration option that needs to be
confirmed, and more like just a CLI option for the current run which we
can just accept as-is.

The text for the prompts has also been reduced to one or two words.

Also added are some checks around image naming and repositories, short
circuiting failures that could occur if these are not specified or are
unknown. For example, if a user does `faas init` and then `faas deploy`
we don't yet know what the image name should be - one hasn't been built.

Fixes: https://github.com/boson-project/faas/issues/91
Fixes: https://github.com/boson-project/faas/issues/90
Fixes: https://github.com/boson-project/faas/issues/89
2020-09-11 14:36:34 -04:00
Matej Vasek 284b77f7ef fix: delete command
There was hard-coded `faas` namespace.
2020-09-10 10:06:20 -04:00
Matej Vasek 91172ef0b1
fix: image override (#88) 2020-09-02 08:37:17 -04:00
Luke K 3fc39aa773
feat: consolidate formatters
- Replaces globally-scoped formatter function with methods
- Defines enumerated Format types
- Renames the 'output' flag 'format' due to confusion with command file descriptors
- FunctionDescription now Function
- Global verbose flag replaced with config struct based value throughout
2020-08-31 16:37:07 +09:00
Luke K 00ac880c3b
docs: fix function typos 2020-08-29 01:55:33 +09:00
Luke K d33fb2d694
feat: test suite
- updated tests to new api throughout
- expanded tests where appropriate
- lint issues
- minor code review comments addressed
2020-08-29 01:55:33 +09:00
Luke K 4918cc7eef
feat: cli usability enhancements and API simplification 2020-08-29 01:54:13 +09:00
Lance Ball 5b4d97a443
feat: add init/build/deploy commands and customizable namespace (#65)
* feat: add init/build/deploy commands and customizable namespace

This commit comprises some fairly large changes in the codebase.
The 'create' command has been extracted into 'init', 'bulid' and
'deploy' commands. The 'create' command remains, but now delegates
most of its work to these other three. This also has resulted in
some rework of the various flags. 

In addition, it is now possible to specify the cluster namespace to
which the function will be deployed.
2020-08-12 10:52:50 -04:00
Matej Vasek 4677b3452f
chore: add lint to GH actions CI 2020-07-29 17:47:08 +02:00
Luke K 711094b02e
rename Service Function to simply Function 2020-07-02 14:52:27 +00:00
Luke K faf1e7aa66
tests to runtime 2020-07-02 14:36:48 +00:00
Luke K f23e81538f
rename language to runtime 2020-07-02 13:06:54 +00:00
Luke K 92976d6009
add context templates to tests 2020-06-16 14:34:22 +00:00
Luke K ac0845c909
reenable full creation 2020-06-11 12:25:36 +00:00
Luke K 5febf1ac4a
add function context (style) to Create 2020-06-11 12:23:49 +00:00
Matej Vasek 5e8dc8b5f7
feat: buildpacks
Implemented builder using buildpack.
2020-06-08 18:38:55 +02:00
Luke K a784445333
progress bar deferred done and cleanup 2020-05-29 03:03:22 +00:00
Luke K 9671e5af74
progress indicator on create 2020-05-28 07:47:07 +00:00
Luke K fd27affb4b
final url print placeholder 2020-05-23 01:25:12 +00:00
Luke K 31d601197a
expand describe to default to current active function (CWD) 2020-05-11 04:59:41 +00:00
Luke K 853d0eb4db
remove defaults to CWD, with name parameter available 2020-05-11 01:40:37 +00:00
Luke K 48e761c999
internal mode stub 2020-05-11 00:27:49 +00:00
Luke K 724b64b51a
FaasNamespace to DefaultNamespace 2020-05-11 00:17:39 +00:00
Luke K a6c10fdaa8
separate function from client to enable contextless methods such as List 2020-05-11 00:12:19 +00:00
Luke K 1a3fbe294d
flatten package structure 2020-05-10 23:55:04 +00:00