Commit Graph

25 Commits

Author SHA1 Message Date
Matej Vasek cc063f79fc
feat: improve docker build and push output (#1364)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-21 14:10:17 +00:00
Lance Ball 16a20844f6
chore: add nodejs as a builder key (#1365)
The https://github.com/knative-sandbox/func-tastic repo uses "nodejs"
instead of "node" as the language runtime. This change makes it possible
for templates in the func-tastic language pack to work out of the box.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-20 17:16:12 +00:00
Lance Ball 5adec03c7b
chore: update all references to kn-plugin-func (#1311)
* chore: update all references to kn-plugin-func

I did not change references in CHANGELOG.md but otherwise, I believe
this should cover all configuration settings, image names, package
names, etc.

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

* fixup: fix instances_test.go

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

* fixup: still some stray kn-plugin-func

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-13 16:31:53 +00:00
Matej Vasek abc4de5b8f
feat: always pull base image for s2i builds (#1292)
Make sure that we use latest image with security fixes.

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-29 11:41:18 +00:00
David Simansky e0bbcc2d08
chore: Refactor use of deprecated io/ioutil package (#1285) 2022-09-27 13:28:15 +00:00
salaboy fe0368a793
[feat] refactoring func.yaml struct to match cmd lifecycle (#1254)
* rebased and updated func struct

* fixing migration to 1.0.0 struct

* fixing on cluster tests

* updaating migration version to 0.34.0

* adding tests for marshalling and migration errors

* adding EOF new line

* updating migrations

* fixing wrong name

* fixing marshalling test

* adding EOF line

* fixing assertion
2022-09-22 20:22:12 +00:00
Matej Vasek 56b56a5559
Testing cleanup (#1272)
* chore: replace WithEnvVar -> t.Setenv()

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

* chore: replace defer with t.Cleanup()

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

* chore: remove unused function

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

* fix: os.Hostname -> os.UserHomeDir

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-22 13:12:12 +00:00
Matej Vasek e2d0f8afdb
fix: s2i build on Windows (#1227)
tar must use forward slashes as separator

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-09 09:42:25 +00:00
Zbynek Roubalik 1112aaa2fe
feat: S2I strategy for on cluster build (#1191)
* feat: S2I strategy for on cluster build

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

* use upstream `s2i` task only

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

* use custom func-s2i task

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

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-08-25 13:03:19 +00:00
Luke Kingland e6ec11b0e5
builder short name constants etc throughout (#1180)
* 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
2022-08-24 19:34:18 +00:00
David Fridrich e659256005
chore: use lower case *functions* in all CLI outputs (#1135)
* first run, F -> f

* fix

* fix

* misspells

* client*.go files

* add client*.go: misspells

* cmd dir test files

* docker dir

* function* files

* i*.go and job.go

* job.go,mock dir,repos*,s2i dir,schema dir,templates*

* test dir

* testing dir

* root dir *.go second round
2022-07-27 13:34:36 +00:00
Zbynek Roubalik 71b0dddc55
chore: add validation for `builder` (#1136)
* chore: add validation for `builder`

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

* address feedback

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-07-25 16:09:24 +00:00
Matej Vasek d5748f0e4e
Improve error message for s2i unsupported runtimes (#1080)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-27 20:41:28 +00:00
Matej Vasek f066218042
Add --platform flag for build/deploy sub-cmd (#1076)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-22 16:40:23 +00:00
Matej Vasek 91e80c0a3c
fix: minor improvements for s2i build (#1068)
* fix: close opened file

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

* fix: symlink handling for build context upload

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-16 20:08:18 +00:00
Matej Vasek 51b99c0e67
fix: premature Close() of docker client (#1066)
* Fix docker client lifecycle

Avoid premature Close() of docker client.

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

* Guard for usage of docker client after close

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-16 17:14:17 +00:00
Matej Vasek 2721ae6bca
Use "as-dockerfile" mode for s2i builds (#1063)
The "daemon mode" doesn't work well with `podman`.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-15 20:57:16 +00:00
Matej Vasek 5f6d11c491
Fix premature Close() of docker client (#1056)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-13 22:46:15 +00:00
Luke Kingland 096085d751
feat: configurable s2i builder images (#1024)
adds support for the builderImages func.yaml attribute
2022-06-01 06:12:02 +09:00
Luke Kingland 1d367c6be5
fix: ignore node_modules for s2i builds (#1019)
- 🎁 Exclude certain directories form S2I build tar know to be either unnecessary or error-prone
- 🐛  Error running Node Functions which unnecessarily had node_modules sent to the build daemon

Exclude various files and cache directories from S2I builds.  This list may need to be expanded in the future.
2022-05-26 23:58:42 +09:00
Matej Vasek e830e09c5f
Fix S2I build with podman. (#1014)
Workaround a bug in podman:
https://github.com/containers/podman/issues/13770

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-05-12 01:12:34 +00:00
Luke Kingland 397ce65598
feat: s2i builder quarkus support (#993)
* feat: s2i builder quarkus support

* use manifest for quarkus s2i build envs
2022-04-27 00:40:56 +00:00
Luke Kingland 14248311b1
feat: s2i builder env var interpolation (#991)
* feat: s2i builder env var interpolation

* nil env values disinclude from interpolate map
2022-04-25 19:18:54 +00:00
Luke Kingland 3be1a77388
feat: s2i builder typescript support (#957) 2022-04-14 10:48:10 +00:00
Luke Kingland a91bcc5fcf
feat: s2i builder with preliminary node support (#923)
* fix: stuck build ticker

* feat: s2i builder prototype

* default builders

* use s2i fork with updated docker

* in-code builder defaults

* s2i builder verbosity constructor arg

* typed errors

* typed error tests

* remove unneeded env code

* s2i build e2e test

* e2e tests

* update licenses

* cleanup

* codegen debug

* update licenses

* Revert "Update actions (#921)"

This reverts commit 8312b5c560.

* update licenses

* e2e test updates

* use GetDefaultDockerConfig for s2i config

* docker.NewClient docs
2022-04-05 13:08:44 +00:00