Commit Graph

660 Commits

Author SHA1 Message Date
Matej Vasek abd4eea0c7
Cleanup commands (#807)
* src: refactor commands

Commands are constructed from root,
not by using init() blocks.

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

* fixup the prefix issue

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

* fixup style

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

* fixup nolint:misspell

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-03 10:26:21 -08:00
knative-automation e1095e0509
Update community files (#812)
Signed-off-by: Knative Automation <automation@knative.team>
2022-02-03 08:09:21 -08:00
Matej Vasek b4e6318ce5
chore: update boson builder image references (#810)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-02 05:06:33 -08:00
Sameer Vohra c6e67ef037
Update installing_cli.md (#806)
Add reference for kn plugins. Specifically plugins need a `kn-` prefix to be detected by know.
2022-02-02 00:25:33 -08:00
Zbynek Roubalik 1f54bdcb1c
src: fix `func.yaml` schema (#805)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-02-01 18:05:32 -08:00
Matej Vasek fff00497f8
feat: completion --build flag of deploy sub-cmd (#802)
* feat: completion --build flag of deploy sub-cmd

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

* src: refactor

Moved functionality.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-01 06:58:31 -08:00
knative-automation 6c6ea0dadc
Update community files (#803)
Signed-off-by: Knative Automation <automation@knative.team>
2022-02-01 01:45:31 -08:00
Lance Ball 2009073591
chore: change TAG to ETAG to avoid stepping on toes (#799)
Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-28 06:23:47 -08:00
Lance Ball 210cd9a199
chore: update Makefile and hack/release.sh to accept TAG (#797)
The upstream release pipeline does not tag the source until the build and
tests have successfully completed. This should allow for our release builds
to pick up the knative infra TAG environment variable when building releases.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-28 05:45:47 -08:00
knative-automation 12a9f20dad
Update community files (#790)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-28 03:30:47 -08:00
Lance Ball ece9ac3645
fix: use paketo base image for springboot (#792)
The build actually seems to require `base` vs `tiny.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-27 09:26:47 -08:00
Lance Ball 6097b8d790
fix: use domain qualified registry for springboot (#789)
* fix: use domain qualified registry for springboot

The builder image name should include the registry name. Also it seems
that the tiny builder doesn't actually work. We need base.

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/775

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

* fixup: regenerate pkged.go with go 1.17

Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-26 11:28:45 -08:00
Matej Vasek 6c282e77c2
fix: error type-check condition (#786)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-01-26 09:44:45 -08:00
knative-automation 7fe39cae18
Update community files (#785)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-26 05:27:45 -08:00
salaboy 61bf5b9da2
Adding git add before commit and push (#781) 2022-01-25 08:27:48 -08:00
Roland Huß 627a88ac3e
Update OWNERS (#783)
Switch to the aliases defined in OWNER_ALIASES.
2022-01-25 08:26:49 -08:00
Lance Ball c58fcb7a9f
chore: skip integration tests for now (#780)
Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-25 07:16:49 -08:00
Zbynek Roubalik d478f555cc
feat: delete pipeline and resources with `func delete` (#763)
* feat: delete pipeline and resources with `func delete`

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

* fix test and prompt

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-24 12:39:29 -08:00
Luke Kingland 6649a71f4d
fix: local cluster name collision (#779) 2022-01-24 10:30:30 -08:00
Matej Vasek 650f99f936
test: fix URL (#777)
On CI machines the image registry is present and reachable.
That causes the actual registry, not mock server, is accessed by the test.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-01-24 03:50:29 -08:00
knative-automation cd11b90a8f
Update community files (#772)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-24 03:39:29 -08:00
Matej Vasek 153e486bc6
fix: auth check (#773)
* fix: auth check

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

* fix: auth check

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-01-21 12:45:04 -08:00
Luke Kingland e918f74b9e
feat!: invoke (#705)
* feat!: rename 'emit' to 'invoke' and default to local

This commit renames 'func emit' command to 'func invoke' and makes the
default behavior to send an event to localhost. The special '--sink'
value 'local' is changed to 'cluster' to indicate that the function
should be invoked on the cluster instead of locally. All other behavior
has remained the same.

BREAKING CHANGE

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

* fixup: update commands.md doc

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

* squash: change Emitter interface to Invoker

Changes Emit() to Send() in the (now named) Invoker interface, and changes
Emit() to Invoke() in the client.

BREAKING CHANGE

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

* squash: use a common Invoker interface for HTTP and events

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

* checkpoint

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

* fixup: change Emitter to EventInvoker

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

* Invoke v2 Draft

* feat: client invoke function

* static invoke defaults and methods

* remove assimilated invoker package

* includes an ignored .func directory on create

* Instances manager with local and remote defaults

Funciton Info is now Instance, representing a Function in a given
environment.

Describing a Function instance is now Instances().Get(f, environment)

Moves Runner to be async with a Stop method to enable returning runtime pid
and port for persisting.

Instances now have a place for primary Route in addition to all routes slice

Running Functions write PID and Port to .func

* cascading targets: local vs remote vs ad-hoc endpoint

* runner start signals and cancel cleanup

* return run on context done or err on channel

* async runner

Refactors the image runner to start the container asynchronously,
reporting back the port on which it started.  Errors are communicated
back via a provided channel and stop is signaled using context
cancelation.

* pid neither required nor available

* add withTransport option

Incorporates addition of custom transport of the emitter into the
renamed version invoker. Flag and help text cleanup.  Re-additionof the
Info accessor.

* schema now includes invocation data

* loop build msg

* run jobs

Externally exposed port is now chosen based on availability, with 8080
preferred and falling back to an os-chosen open port.
The Client Run method is now async, returning the port assigned to the
running Function, a stop/cleanup function and a runtime errors channel.
The Runner is internally divided into the runner and its started Jobs.

* job metadata

Extracts job metadata tracking to a Job object in the core,
Handles multiple instances of the same Function by creating a single
file for each instances in .func/instances/<port>

* remove superfluous error types and flag bindings

* feat: enable invoke target remote

* feat: preferentially invoke local, remote if running

* feat: read --file for invoke

* feat: invoke confirm prompts

* fixup cli tests

- Updates to handle asynchronous Runner
- Standardize on the naming convention for selective running

* docker runner tests and lint errors

* test refactor

* feat: invoke format override

* comments, spelling and other cleanup

* invoke command doc

* feat: invoke format interactive option

* rename runjob.go to job.go

* e2e test flag update

* test naming homoginization

* silence build activity messages when verbose

* test debugging

* code review updates

- return Job from Client.Run rather than constituent members
- Treat .gitignore as contentious, punting on feature to mutate if
  extant.
- docs wording changes
- add invocation format to pertinent manifest.yaml files

* help text spelling etc.

Co-authored-by: Lance Ball <lball@redhat.com>
2022-01-21 12:04:05 -08:00
Matej Vasek 8ceb325142
Enable custom CA for specified server names (#770)
* src: refactor

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

* src: Allow usage of custom CA for

Allows TLS verify against custom CA for chosen server names.

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

* fixup: style

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

* fixup: lint

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

* fixup: cleanup

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-01-21 06:50:04 -08:00
Luke Kingland ce938122d8
src: remove need for hosts entry for local clusters (#742) 2022-01-18 12:58:33 -08:00
Lance Ball 74158dc63d
fixup: document minimum podman version (#766)
Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-18 11:12:33 -08:00
Lance Ball 2d37be5536
chore: bump lifecycle version to 0.13.2 (#764)
* chore: bump lifecycle version to 0.13.0

And add docker.io/paketobuildpacks as another trusted builder prefix.

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

* fixup: bump to 0.13.2

Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-17 14:52:31 -08:00
Fabian Lopez 7de4dc1667
ensure build flag binds for run command (#758)
Signed-off-by: Fabian Lopez <lfabian@vmware.com>
2022-01-17 01:41:29 -08:00
Matej Vasek 1dded12796
Support git scp url format (#761)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-01-13 11:24:12 -08:00
Zbynek Roubalik bddac30621
feat: add `function.knative.dev/name: functionName` label to every resouce created for a Function (#757)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-13 10:19:11 -08:00
Zbynek Roubalik 3d7c351544
fix: use correct --build flag value for `func-deploy` Tekton Task (#760)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-13 09:48:12 -08:00
Zbynek Roubalik f06fd97759
src: simplyfing Knative Deployer RoleBinding (#759)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-13 08:21:12 -08:00
knative-automation 21d857877b
Update actions (#749)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-13 04:10:12 -08:00
Matej Vasek 15d617f99d
src: use common functionality for docker cred retrieval (#756)
* Use common functionality for docker cred retrieval

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

* fixup: docker auth secret for tekton pipeline

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

* fixup: style

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-01-13 03:52:12 -08:00
Zbynek Roubalik cb719ff564
feat!: support on cluster build from git repo with Tekton (#743)
* feat: support on cluster build from git repo with Tekton

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

* incorporate feedback

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

* incorporate feedback 2

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

* fixup-licence

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

* fix deploy with --build=disabled

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

* incorporate feedback

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

* incorporate feedback

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

Co-authored-by: Matej Vasek <mvasek@redhat.com>
2022-01-12 11:58:51 -08:00
Zbynek Roubalik b8d248a00b
feat: add definition for `func-deploy` Tekton Task (#740)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-12 11:57:50 -08:00
Zbynek Roubalik 9117940e14
doc: on cluster build documentation (#744)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-12 11:55:51 -08:00
Lance Ball a5793916a0
chore: release 0.21.0 (#737) 2022-01-12 10:56:51 -08:00
Lance Ball 963659bd0b
chore: add knative infra release scripts (#729)
* chore: add knative infra release scripts

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

* fixup: add newlines at EOF

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

* fixup: whitespace

Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-12 06:49:51 -08:00
knative-automation 47c82c0375
Update community files (#747)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-11 07:40:14 -08:00
Luke Kingland 4504b21369
src: simplify go templates (#741) 2022-01-10 13:59:12 -08:00
Zbynek Roubalik 64ba17b4fb
feat: add possibility to disable pushing of image in `deploy` command (#739)
* feat: add possibility to disable pushing of image in `deploy` command

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

* remove commented code

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

* incorporate feedback

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-07 06:40:26 -08:00
Zbynek Roubalik 2282cf899d
Revert "feat: add possibility to disable pushing of image in `deploy` command (#736)" (#738)
This reverts commit 4e5a5e8307.
2022-01-06 08:03:02 -08:00
Zbynek Roubalik 4e5a5e8307
feat: add possibility to disable pushing of image in `deploy` command (#736)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-06 07:22:01 -08:00
Zbynek Roubalik 0b130dd769
Add `ko` to produce image with `func` command in CI (#735)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-06 06:39:02 -08:00
salaboy 7d22e20092
adding ko to produce image with func command (#692) 2022-01-06 06:37:02 -08:00
jrangelramos 3177287571
chore: Adding support to ssh-agent on Windows using named pipes (#733) 2022-01-05 10:38:33 -08:00
knative-automation e0b5adcaf4
Update actions (#730)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-05 09:50:33 -08:00
knative-automation f5147fe1ea
Update community files (#734)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-05 04:47:32 -08:00
knative-automation 7cf2b470f4
Update community files (#731)
Signed-off-by: Knative Automation <automation@knative.team>
2021-12-22 07:47:18 -08:00