Commit Graph

110 Commits

Author SHA1 Message Date
Matej Vašek 29fd2eaacc
Revert bad changes (#2495)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-09-12 20:04:12 +00:00
Matej Vašek cbf98fdd23
Update Makefile (#2493) 2024-09-11 19:04:20 +00:00
Matej Vašek a965c0fe0a
Improved ldflags setting in Makefile (#2488)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-09-09 13:13:51 +00:00
Matej Vašek 2fdca6cc0f
Include go.sum in the Go CloudEvent template (#2441)
The go.sum must be in place otherwise "go list -f {{.Incomplete}}"
returns true which breaks s2i build.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-07-23 20:13:25 +00:00
Matej Vašek d7c4f1bbb1
chore: updated Go linter (#2403)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-27 05:07:00 +00:00
Matej Vašek 5c9cc0b4a0
fix: docs gen runs agains empty kubeconf (#2385)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-20 12:56:18 +00:00
Dave Protasowski f01c709472
allow go install knative.dev/func@{version} (#2220) 2024-03-13 02:27:10 +00:00
Matej Vasek fa77c2897d
chore: update Go lint (#2100)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-12-04 17:03:38 +00:00
Matthias Wessendorf 5bb373ab2c
Adding support for `func subscribe` for creating mutiple triggers, based on event filters (#2001)
* Adding support for `func subscribe` for creating mutiple triggers, based on event filters

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Update cmd/subscribe.go

Co-authored-by: Luke Kingland <luke@lukekingland.com>

* Update cmd/subscribe.go

Co-authored-by: Luke Kingland <luke@lukekingland.com>

* Update cmd/subscribe.go

Co-authored-by: Luke Kingland <luke@lukekingland.com>

* Update cmd/subscribe.go

Co-authored-by: Luke Kingland <luke@lukekingland.com>

* Update cmd/subscribe.go

Co-authored-by: Luke Kingland <luke@lukekingland.com>

* Update cmd/subscribe.go

Co-authored-by: Luke Kingland <luke@lukekingland.com>

* removing unused import

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* running make

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Some import ogranization

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Change argument syntax

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* changes

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Adding some emoji text

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* 💄 move subscriptions underneath the deploy element

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* adding silly emoji to build

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Adding some simple/copied/modified test

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Running 'make schema-generate'

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Update function

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Little unit test

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Adding a bit more help text

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* misspell instruction

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

---------

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Co-authored-by: Luke Kingland <luke@lukekingland.com>
2023-11-06 13:56:38 +00:00
Matej Vasek 7fa331b544
fix: better cleaup for Java template tests (#2051)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-10-26 12:19:54 +00:00
Matej Vasek e7c9695a4f
chore: use ./mvnw not mvn in tests (#1988)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-09-21 16:28:13 +00:00
Matej Vasek 922413464f
chore: faster `make build` (#1937)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-22 06:36:01 +00:00
Matej Vasek 718948a3d8
chore: update release generation (#1924)
* Minimize release binary size.
* Release latest version of buildpack tekton task.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-14 14:21:44 +00:00
Matej Vasek 89cf6b7a06
chore: refer correct tkn yaml in prow test (#1918)
Without this change prow test will refer tkn yamls from the main branch
not from the PR head branch.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-09 20:56:35 +00:00
Matej Vasek a74e1d73c4
chore: use tkn tasks from PR branch in CI (#1914)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-09 00:43:34 +00:00
Luke Kingland 4e0db21b34
rename knative-sandbox (#1905)
* rename knative-sandbox

* fixup bad merge

* fixup: use knative.dev not github.com import path

---------

Co-authored-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <matejvasek@gmail.com>
2023-08-05 02:11:08 +00:00
Luke Kingland a2834c2283
src: update func go runtime dep (#1879)
* src: update func go runtime dep

* func-go v0.18.2

---------

Co-authored-by: Matej Vasek <mvasek@redhat.com>
2023-07-25 19:44:40 +00:00
Luke Kingland b38d19b2af
rebuild templates on make update-runtimes (#1835) 2023-06-30 19:24:28 +00:00
Luke Kingland 883dcbb203
src: make test and check go (#1828)
- Updates make test-go to include scaffolding
- Creates make check-go to run basic source quality checks
2023-06-30 05:37:27 +00:00
Lance Ball 803e7e6d07
chore: add presubmit-unit-tests Makefile target (#1833)
This commit adds a Makefile target that will simulate the Prow presubmit
tests that are run for pull requests on GitHub. It makes use of the same
image used by Prow, and runs the ./test/presubmit-tests.sh script so
that developers can run the same suite of tests that are run in CI/CD.

Signed-off-by: Lance Ball <lball@redhat.com>
2023-06-28 08:32:53 +00:00
Lance Ball b6b15f9d37
chore: quiet template tests for quarkus, springboot & rust (#1832)
Signed-off-by: Lance Ball <lball@redhat.com>
2023-06-27 15:04:52 +00:00
Luke Kingland 19509e5053
feat: scaffolded functions certs (#1823) 2023-06-26 18:57:51 +00:00
Luke Kingland 8a078cea0c
src: make update-runtimes (#1822)
- Updates func-runtime-go 20 v0.2.3
- Create an 'update-runtimes' make target
- Standardizes plurality of "Cloudevents" throughout
2023-06-22 07:00:35 +00:00
Luke Kingland 94582efa49
src: interstitial commit version (#1817)
The Knative version is now included in version command verbose output

Building an unreleased version no longer returns v0.0.0, but instead the
value provided by `git describe --tags` which is the most recent tagged
release with a suffix consisting of the number of commits since that
release and the short hash.

Verbose output now always includes the current commit on a dedicated
line.
2023-06-20 17:15:34 +00:00
Andrejus Chaliapinas f6c11c94af
Added Rust templates linting (#1814)
* Adding Lint for Rust templates

* Run CI on my branch

* Remove CI on non-main branch
2023-06-14 17:03:47 +00:00
Matej Vasek 18fe6430a1
chore: update to Go 1.20 (#1802)
* chore: update to Go 1.20

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: update codegen

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: update golangci-lint

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-08 21:22:58 +00:00
Luke Kingland 895226fccc
src: remove date from version (#1776)
In an effort to move one step closer to reproducible builds, the date of
compliation is removed from the binary.
2023-06-05 09:50:41 +00:00
Zuhair AlSader 6558f9652d
add pvc and emptyDir to function_volumes (#1666)
* add pvc and emptyDir to function_volumes

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* add pvc and emptydir to deployer

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* add config functions

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* update tests

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* use random string for emptydir

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* include func yaml schema

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* fix make schema-generate

it needs to be regenrated every time.

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* make function volumes dependency-free

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* add prompt for extension flags

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* add dependency in func_yaml-schema

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

---------

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>
2023-05-03 13:57:56 +00:00
Jefferson Ramos 9d00af158b
e2e tests restructuring / refactoring (#1615) 2023-03-16 20:52:59 +00:00
Matej Vasek 9a9da1ff3f
chore: coverage for e2e tests (#1603)
* chore: coverage for e2e tests

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: disable thread sanitiser

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-08 17:53:20 +00:00
Lance Ball 0b1d537309
chore: update references to zz_filesystem_generated.go (#1580)
* chore: update references to zz_filesystem_generated.go

Some places were missed in the repo restructuring. This should fix
test_infra build failures.

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

* fix: do not put "." into template zip array (#24)

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <matejvasek@gmail.com>
2023-02-23 19:12:29 +00:00
Zbynek Roubalik 726b566f83
fix: deploy annotations & labels correctly (#1574)
* fix: deploy annotations & labels correctly

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* increase timeout

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

---------

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-02-21 15:24:26 +00:00
Zbynek Roubalik 5a4803bf95
chore: refactor repository layout (#1554)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-02-15 08:46:52 +00:00
Luke Kingland 554e74a309
chore: remove underscore prefix from test packages (#1503)
* remove underscore prefix from test packages

* springboot patch attempt
2023-01-20 09:01:02 +00:00
Lance Ball 06693859be
enhancement(templates): use latest faas-js-runtime + cloudevents (#1422)
* enhancement(templates): use latest faas-js-runtime + cloudevents

Better typing of handle functions and return values for typescript based functions.

/kind enhancement

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

* fixup: improvements

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

* fixup: missing FUNC_LOG_LEVEL

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-11-10 12:59:15 +00:00
Luke Kingland a31d2e5e50
fix: docs generator needs not ldflags (#1354) 2022-10-19 07:20:11 +00:00
Lance Ball 318d3e1621
chore: change Makefile for multiple tags at HEAD (#1252)
With the move to the full Knative release train, we now get two tags on
HEAD for the release commit. In the current case, it was `v0.34.0` for
the "internal" version, and `knative-1.7.0`. The Makefile attempts to
determine the version for static linking by looking at the tag at HEAD.
With the git command returning two tags, `make` broke. This change takes
the first of the two tags (will always be `knative-x.x.x`) which I think
is less confusing for CLI users than `v0.34.0`.

I've also updated docs with a couple of changes that weren't reflected
there but landed in 1.7.

Finally, I've removed versions.txt as that is no longer used, and
docs/RELEASING.md as our processes have changed.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-12 11:45:53 +00:00
Lance Ball 1a54a8d78a
chore: add coverage for integration tests (#1307)
Added coverage output for integration test, and added codecov uploads
for both integration and unit tests.

This commit changes the output file to coverage.txt as well, in order to
be consistent with knative test infrastructure.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-10 13:18:35 +00:00
David Simansky 794865fcc5
Update Go in actions to 1.18 (#1247)
* Update Go in actions to 1.18

* Update golangci binary
2022-09-14 16:01:05 +00:00
Jefferson Ramos 4041d609dd
test: oncluster build initial e2e set of tests (#1193) 2022-09-05 13:08:22 +00:00
Lance Ball 81289dc757
doc: use cobra markdown generator for command docs (#1169)
This commit removes the docs/reference/commands.txt file and instead
uses the Cobra built-in documentation generator to create markdown
documents for every command.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-08-25 13:16:19 +00:00
Dirk Haubenreisser 48c348806f
Added binary builds for platforms ppc64le and s390x (#1160) 2022-08-11 14:28:58 +00:00
Lance Ball df022f5c93
docs: replace commands.md with generated text file (#1089)
* docs: replace commands.md with generated text file

This commit removes commands.md document which tends to get out of date
pretty easily and replaces it with a generated commands.txt file. The
help text generation is fairly naive, but should be sufficient for the
time being.

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

* fixup: tweak title formatting

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

* fixup: run build-docs.sh again after recent change

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

* fixup: add docs generation to make build target

Also removes the random UUID as the default for `invoke` since it's a
little misleading. That value will not be the one that's used, since
it's random. And because it's random, it changes the docs every time.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-07-25 16:10:24 +00:00
Matej Vasek 819b433edb
feat: build for Linux ARM64 (#1123)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-07-18 19:56:59 +00:00
salaboy a454ea9ae9
chore: adds tests for springboot templates (#1059)
* adding tests for springboot templates

* adding test-springboot to test-template goals

* removing space

* removing vendor license
2022-06-14 17:24:16 +00:00
Jefferson Ramos 01f113969a
CI enhancements (e2e tests) and Go template fix (#970)
* Adding timeout and additional logs on e2e http test

* Better revision check on e2e http update test

* ci: Adding workflow to run e2e for all runtimes

* fix: server error 500 for Go cloudevents template
2022-04-19 14:18:28 +00:00
Lance Ball 00d5a82722
chore: add Apple M1 build in cross-platform target (#932)
* chore: add Apple M1 build in cross-platform target

Might fix: https://github.com/knative-sandbox/kn-plugin-func/issues/377

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

* fixup: review feedback/better names

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

* fixup: adjust release workflow

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

* fixup: remove duplicate

Signed-off-by: Lance Ball <lball@redhat.com>
2022-04-01 14:47:45 +00:00
Matej Vasek fe6d9f7d70
Improve cleanup recipes in Makefile (#887)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-09 12:17:49 -08:00
Matej Vasek cc049952bb
Generate templates zip unconditionally (#879)
* Improve formant performance in template generation

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Improve memory footprint of template generation

Use streamlined generation which is limiting need for in memory buffers.
Might be imprtant if we had big files in templates.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Generate templates unconditionally

Rationale:
The way we create prerequisites (the find command) we cannot detect deleted files.
The generation is fast (around 500ms) so we can afford that.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Test embbeded templates content on push to main

This has to run prior to `make test` because the `test` recipe
enforces generation of the templates zip.
This would prevent test from being run against git commited templates
zip.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Optimization don't use unnecessary io.Pipe

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-06 14:28:35 -08:00
Matej Vasek c4a7e095de
Use custom zip embedding not pkger (#835)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-02 06:41:43 -08:00