Commit Graph

292 Commits

Author SHA1 Message Date
Zbynek Roubalik c86fdbc5e7
src: use go 1.14 in the templates (#299)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-14 19:47:32 +02:00
Lance Ball 5da927808e
chore: update Node.js faas-js-runtime dependency to 0.6.0 (#302)
* chore: update Node.js faas-js-runtime dependency to 0.6.0
* fixup: remove erroneous console.error statement

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-14 13:27:35 -04:00
Zbynek Roubalik 4957b7c6bf
chore: bump CE version in Go templates (#300)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-14 12:59:42 -04:00
Lance Ball ad335d217e
chore: update python templates to use parliament context/event (#301)
* chore: update python templates to use parliament context/event

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: fix tests

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-14 12:50:52 -04:00
Matej Vasek 129dc5a834
fix: build needs to use legacy jar
this should be reverted once our buildpack supports fast-jar

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-04-12 16:52:49 +02:00
Matej Vasek f2c7b764c2
chore: update Quarkus version (#291)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-04-01 09:28:36 -04:00
Lance Ball 08f4fc7bd9
feat: add python templates (#286)
Signed-off-by: Lance Ball <lball@redhat.com>
2021-03-30 17:08:42 -04:00
Luke Kingland f1a6561543
src: also package templates on 'go generate' 2021-03-10 19:35:27 +09:00
Matej Vasek 38fd673fdb
fix: sprint-boot template
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-02 04:33:27 +01:00
Zbynek Roubalik a5cbe3061b
src: rename from faas to func (#253)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-01-21 17:10:39 +01:00
Zbynek Roubalik 55024921c2
fix: correct fn signatures in Go Events template (#246)
* fix: correct fn signatures in Go Events template
* change cloudevents import name to event

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-12-10 16:11:12 -05:00
Kamesh Sampath 557361a374
feat: add spring cloud function runtime and templates (#231)
* feat: add spring cloud function runtime and templates

* docs: review updates

* squash: apply suggestions from code review

Co-authored-by: Lance Ball <lball@redhat.com>
2020-11-25 12:15:48 -05:00
Matej Vasek b595500bb0
src: updated Quarkus template
Function in template now accepts beans instead of java.lang.Object

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2020-11-06 18:19:05 +01:00
Lance Ball beb838ff43
fix: return JSON in Node.js event template (#211)
The event template was just returning a string, but the default response
content type is application/json so browsers were failing to parse the string
as JSON.

Signed-off-by: Lance Ball <lball@redhat.com>
2020-11-06 10:46:53 -05:00
Zbynek Roubalik 470ebb9da4
rename function -> func (#217)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-11-06 12:47:30 +01:00
Zbynek Roubalik cd57692c9d
feat!: rename faas to function (#210)
* rename faas to function

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* function.yaml -> func.yaml

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-11-06 10:41:42 +01:00
Lance Ball 6110d50b6b
templates: Node.js event template to return event (#202)
This commit modifies the Node.js template so that it returns a CloudEvent. The
tests are also modified to test for CloudEvent attributes and headers. Additionally
the faas-js-runtime bump reverses the parameters for the function.

Fixes: https://github.com/boson-project/faas/issues/190
Fixes: https://github.com/boson-project/faas/issues/194

Signed-off-by: Lance Ball <lball@redhat.com>
2020-11-05 10:22:20 -05:00
Matej Vasek 5591e7fa2c
fix: examples in readme 2020-10-20 19:37:40 +02:00
Lance Ball 74511948ce
feat: introduce CloudEvent data as first parameter for event functions (#172)
The 0.4.0 version of faas-js-runtime extracts the CloudEvent data from
an incoming event and provides that as the first parameter when invoking
a function which receives a CloudEvent. This commit bumps to that version
as well as improves the overall readability and code documentation for the
Node.js CloudEvent function.

Signed-off-by: Lance Ball <lball@redhat.com>
2020-10-14 09:46:37 -04:00
Matej Vasek ffc6a123e4
fix: update quarkus templates 2020-10-13 17:57:54 +02:00
Lance Ball 6d301257f5
chore(templates): bump faas-js-runtime to 0.3.0 and update the name (#150)
* chore(templates): bump faas-js-runtime to 0.3.0 and update the name

The module name lost its @redhat prefix, and bumped a version. This
pulls in that latest dependency.

Running pkger for the first time on a new system also resulted in a
minor version bump for that dependency.


Signed-off-by: Lance Ball <lball@redhat.com>
2020-10-07 17:48:30 -04:00
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
Matej Vasek 06391a4243
chore: update go cloudevent sdk dep 2020-09-29 18:24:53 +02: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
Matej Vasek 02309a24a1
fix: sync package-lock.json (#137) 2020-09-24 09:18:02 -04:00
Lance Ball 1b0bb15147
feat: add local debugging to node.js templates (#132)
This commit adds nodemon and an `npm run debug` command to the Node.js
templates to support debugging on localhost.
2020-09-22 09:32:23 -04:00
Matej Vasek 279e990843
chore: update Quarkus version to 1.8.1.Final 2020-09-21 15:08:15 +02:00
Matej Vasek bb575b04c0
fix: signature of HTTP go function in template 2020-09-09 15:27:38 +02:00
Matej Vasek 565066ef4b
chore: update quarkus version to 1.7.2.Final 2020-09-08 21:23:56 +02:00
Lance Ball 609ab86a4d
templates(node): make node templates use npx @redhat/faas-js-runtime (#99)
Currently the templates have a `local.js` file and an explicit dependency
on the @redhat/faas-js-runtime module. This removes that build-time
dependency and replaces it with a runtime dependency by using the (pending)
CLI from the module.

This is nice for a couple of reasons.

- Reduces the build time during `faas deploy`
- Eliminates the need for `faas` to bump with updates to faas-js-runtime

See: https://github.com/boson-project/faas-js-runtime
2020-09-08 14:16:51 -04:00
Luke K 3d51c27c6c
docs: initial Go template READMEs 2020-09-04 22:27:16 +09:00
Luke K 00ac880c3b
docs: fix function typos 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 ea7fe15376
src(templates/node): update Node.js templates (#68)
This commit updates the Node.js templates to use the latest faas-js-runtime
framework, and fixes a couple of dependency issues and broken tests. I have
also added a build time test for these templates so that if/when they change
again, we can be sure to catch any problems.
2020-08-13 17:05:25 -04:00
Matej Vasek 17cdf05801
feat: http template for Quarkus stack 2020-07-27 16:03:55 +02:00
Lance Ball 5d6e2d3c8c
init: add Node.js HTTP template
Note that this template currently points to boson-project/faas-js-runtime
for it's framework dependency as it depends on currently unreleased features.
Once 0.3.0 of that project is released, this template should be updated.
This dependency is only needed for local testing and development.
2020-07-09 15:14:32 -04:00
Luke K 2b4227736f
move js template to quarkus runtime 2020-07-02 13:07:51 +00:00
Luke K 66fb086d94
move java template to be quarkus runtime 2020-07-02 13:07:36 +00:00
Luke K a2f0ef312c
java events template 2020-06-11 12:25:35 +00:00
Luke K 4122522f23
js events template 2020-06-11 12:25:35 +00:00
Luke K 50da540bfb
templates generation docs 2020-06-11 12:25:35 +00:00
Luke K 6d720f44f2
example go templates for HTTP and CloudEvents 2020-06-11 12:21:54 +00:00