Commit Graph

946 Commits

Author SHA1 Message Date
Luke Kingland 6673395834
src: better error when custom template not found 2021-05-07 14:05:38 +09:00
Luke Kingland a31a6f67a1
src: better errors when custom runtime not found 2021-05-07 14:05:38 +09:00
Luke Kingland 11164bf8d9
build: create separate target for templates.tgz 2021-05-07 14:05:38 +09:00
Luke Kingland 4db07b412f
src: use consistent separators for fs.FS instances 2021-05-07 14:05:37 +09:00
Luke Kingland 3bfc13380f
src: update go event template dependencies 2021-05-07 14:05:37 +09:00
Luke Kingland 6cc0e67b1c
src: tarfs assumes forward slashes internally 2021-05-07 14:05:36 +09:00
Luke Kingland c2b216857b
feat: support windows paths in embedded templates FS 2021-05-07 14:05:16 +09:00
Luke Kingland acc56b0900
feat: positive error when runtimme or template unrecognized 2021-05-07 14:05:16 +09:00
Luke Kingland 895872aee7
fix: lint issues 2021-05-07 14:05:16 +09:00
Luke Kingland 1e3959c045
ci: go 1.16 compatiblity updates 2021-05-07 14:05:16 +09:00
Luke Kingland 7dc772ec62
feat: preserve file modes using in-memory tar FS 2021-05-07 14:05:14 +09:00
Luke Kingland 63b7f11471
feat: create templates archive on go generate 2021-05-07 14:04:41 +09:00
Luke Kingland 876b0dd0f7
ci: remove pkger from ci 2021-05-07 14:04:41 +09:00
Luke Kingland f006ab1e32
src: remove pkger dependency and tidy 2021-05-07 14:04:39 +09:00
Luke Kingland 4d9d0a7b4e
src: remove packaging artifact 2021-05-07 14:01:06 +09:00
Luke Kingland e44c1ad74c
src: remove pkger from make targets 2021-05-07 14:00:46 +09:00
Luke Kingland 38874a4afd
src: replace pkger with embed.FS 2021-05-07 14:00:46 +09:00
Luke Kingland 4025460f73
src: update references to deprecated ioutil 2021-05-07 14:00:46 +09:00
Luke Kingland 512d4c2580
src: require go 1.16 2021-05-07 14:00:46 +09:00
Matej Vasek 2b5814c8c8
src: cleanup after test
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-05-06 15:04:12 +02:00
Zbynek Roubalik 9488e01a26
chore: fix typo in node http template (#329)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-05-06 10:27:18 +02:00
Matej Vasek 18cb0f4652
src: update knative deps to 0.21.0
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-05-05 17:20:32 +02:00
Lance Ball 857b0fd19d
feat: add/improve spinner for build and deploy (#322)
This commit modifies the progress meter so that, by default there is no
step counter. It also modifies the responsibility for calling `Done()`,
making it the job of the command rather than the client. This is because
the client does not know how many commands will be executed and therefore
cannot know when the progress bar is done.

This commit also adds String() to the progress bar, and moves logging
responsibility out of the deployer itself and fully into the client.
Deployer#Deploy() now returns a DeploymentResult.

Fixes: https://github.com/boson-project/func/issues/296

Signed-off-by: Lance Ball <lball@redhat.com>
2021-05-03 14:25:19 -04:00
Lance Ball 5feb0e20f3
feat: add support for annotations in func.yaml (#314)
This commit adds limited support for annotations in the func.yaml
config file. The feature is limited, because it's only additive. A
user can add an annotation `foo: bar` in the config and deploy the
function, successfully setting that annotation on the Service.
However, if they subsequently remove `foo: bar` from the config
file, it will _not_ be removed from the deployment. This is because
it's not possible to know, from the set of annotations that currently
exist on the deployment, which ones were set by us and which were not.
So, removing any annotations that are not in func.yaml is unsafe.

It may be possible to store in a hidden file somewhere all of the
user-supplied annotations, allowing us to diff func.yaml with that file,
but I'm not sure I want to go down that path. It might just be best to
document this limitation.

We may also want to document that annotations added through func.yaml
should be user supplied settings/values, and not annotations that are
managed by knative (e.g. the autoscaling annotations).

Fixes: https://github.com/boson-project/func/issues/307

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-28 13:59:03 -04:00
lkingland 255b4fb33c
Draft releases through synchronous tagging (#320)
* feat: synchronously tag releases

* fix: missing verbose version info in inter-release binaries
2021-04-27 17:06:39 -04:00
Lance Ball 89ff286a1f
refactor!: change envVars to env in func.yaml (#316)
There are some places where I've changed variable and function names
where it wasn't strictly necessary. If you don't mind the bit of churn
that results, changing these makes `rg -i envvars` a nice way to check
for anything that could be overlooked.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-27 10:46:50 -04:00
Zbynek Roubalik 541e8586f7
feat: function name matches KService name (#317)
* feat: function name matches KService name

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

* fix typo

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-26 10:13:32 +02:00
Zbynek Roubalik 36926acfb7
docs: tutorial references to /latest/ for binary download (#318)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-23 16:51:19 -04:00
Matej Vasek 7f8e5954a9
feat: usage of local evnvvar in func cfg file
User now can use syntax like:
envVars:
  SOME_SECRET: {{env.API_KEY}}

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-04-23 17:51:02 +02:00
Zbynek Roubalik f1ba8c8bd9
chore: adding references to guides (#313)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-23 11:45:26 -04:00
Lance Ball 0d21f62731
docs: add func.yaml field documentation (#312)
This adds a simple explanation of each of the fields in the `func.yaml`
configuration file.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-23 11:29:59 -04:00
Matej Vasek 06455f4bac
fix: default for `--builder` flag
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-04-22 15:44:15 +02:00
Matej Vasek 12b28f966b
docs: add template reference docs for Quarkus
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-04-19 16:24:48 +02:00
github-actions[bot] dd2061c3af
chore: release 0.12.1 (#295)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-14 14:53:41 -04:00
Zbynek Roubalik 2309dd3a53
docs: Golang function developer's guide (#297)
* docs: Golang function developer's guide

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-14 14:39:15 -04:00
Matej Vasek 4f60504708
src: Quarkus events template uses CloudEvent<> (#303)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-04-14 14:28:08 -04:00
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 ff4892f171
docs: minor chores and fixes (#298)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-14 13:00:55 -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
Lance Ball e8b2c1411a
docs: add template reference docs for Python (#292)
* docs: add template reference docs for Python
2021-04-14 10:00:59 -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
Shashankft9 436c5f8b3f
docs: integrators guide update (#293)
* doc update for function creation using client

* root changed to func name
2021-04-12 16:39:07 +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 ce47370654
chore: fix versioning in CI builds (#290)
* chore: fix versioning in CI builds

For unknown reasons, the git tag for a release CI build via release-please
seems to happen after the build completes. It's a bit uncleear, but the
result is that we get v0.0.0 versions for released builds.

This commit modifies the Makefile to allow for an environment override of
the $VERS variable. Since the release-please-action documents `tag_name`
as output from the action, we can use this in CI to set the environment
variable.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-01 09:28:08 -04:00
github-actions[bot] 4332480afe
chore: release 0.12.0 (#271)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-03-30 17:11: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
lkingland 62a71c3b82
ci: run release action prior to checkout (#289) 2021-03-30 09:38:14 -04:00
Matej Vasek 7ed2e86d96
fix: exposed port
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-29 23:53:00 +02:00