Commit Graph

35 Commits

Author SHA1 Message Date
Jefferson Ramos 2cfb59db1f
fix: updated func-deploy tekton task to alingh with to new deploy command build flag options (#1246) 2022-09-14 14:56:06 +00:00
Luke Kingland 15713b2a75
feat!: deploy autobuild and flag persistence (#1079)
* feat: deploy autobuild and flag persistence

* cleanup

* help text, comments and test cleanup

* removing usurped commands.txt

* add platform to deploy synopsis help
2022-09-14 11:45:10 +00:00
Zbynek Roubalik d9ffaa944e
fix: s2i on cluster build of Quarkus functions (#1233)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-09-12 20:54:47 +00:00
Gab Satchi 7e96146840
Adds labels and annotations from func.yaml to pipeline resources (#1205)
* adds labels from func.yaml to pipeline resources

* Unify function labels across resources (kService and tekton pipelines)

* Adds function annotations to pipeline resources

* Remove refactored function
2022-09-09 12:48:25 +00:00
Zbynek Roubalik 2ee2c61b8b
fix: on cluster build - workaround for Tekton issue with empty array (#1214)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-09-07 20:29:18 +00:00
Zbynek Roubalik 317553206a
fix: on cluster build - populate image name if not set (#1213)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-09-06 14:36:45 +00:00
Jefferson Ramos 70c6130f55
fix: on cluster builds when buildEnvs contains only one build environment (#1200) 2022-08-30 15:31:17 +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
Zbynek Roubalik bfdbdbebe8
On cluster build: support Build Envs (#1174)
* On cluster build: support Build Envs

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

* add test

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

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-08-19 13:32:52 +00:00
Zbynek Roubalik 65c30abb39
feat: deploy Tekton task supports optional `image` parameter (#1140)
* feat: deploy Tekton task supports optional `image` parameter

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

* address feedback

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-07-27 14:52:36 +00:00
Zbynek Roubalik b4b4cc34c3
feat: add OpenShift related Annotations & Labels (#1106)
* feat: add OpenShift related Annotations & Labels

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

* fix test

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-07-13 18:19:14 +00:00
Zbynek Roubalik f4537dd3d5
fix: use 0 group id for func-buildpacks Task (#1105)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-07-12 20:38:12 +00:00
Matej Vasek 3b198cb781
fix: image push authorization check (#1109)
Check that we can actually push image.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-07-12 18:44:13 +00:00
Gunjan Vyas afd224fe5c
feat: deploy success message also displays the namespace (#1090)
* func deploy should display namespace

* Modified e2e to consider namespace

* Added Namespace field in DeploymentResult struct

* Modified unit test for client deploy

* e2e fix
2022-07-06 16:34:08 +00:00
Matej Vasek d4f96bb694
Preserve func.yaml for Quarkus BP build (#1092)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-30 18:29:31 +00:00
Zbynek Roubalik 04b32d15c6
feat: check valid runtimes for on cluster build (#1088)
* feat: check valid runtimes for on cluster build

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

* remove unnecessary import alias

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

* add unit test

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-06-30 13:24:31 +00:00
Jefferson Ramos d1dc7e6ad1
fix: workaround for missing func.yaml on tekton step result (#1070) 2022-06-16 18:09:17 +00:00
Zbynek Roubalik 6030676ec6
chore: print correct logs for failed PipelineRun (#1046)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-06-09 09:11:38 +00:00
Luke Kingland 17dc507c25
feat: pack builder images individually configurable (#1028) 2022-06-03 20:31:52 +00:00
Luke Kingland dc8abf179c
feat: expose default builder image logic for in-cluster builds (#1021)
Tekton pipeline runs now use the same logic for determining default builder image as a local buildpack build.

In order to implement varying build strategies (s2i vs buildpacks), we were unable to rely on hard-coded builder images. These defaults were moved in-code, with builders defined in func.yaml being an optional manual overrdide. This PR updates the Tekton deployment process to rely on this defaulting logic, rather than require the func.yaml override (which would preclude a Function from being able to be built using other strategies).
2022-05-26 23:56:59 +09:00
Zbynek Roubalik ce26a23352
fix: ignore `is forbidden` errors when deleting function and resources (#988)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-04-22 20:34:31 +00:00
Zbynek Roubalik 36cfef726f
Print logs if Pipeline Run fails (#943)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-04-05 16:07:44 +00:00
Zbynek Roubalik e9251f518c
feat: on cluster build doens't require privileged cluster permissions (#934)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-04-05 12:52:43 +00:00
Luke Kingland 9a0335de7d
src: exported client constructor with options (#883)
* update root and version structure and help text

* fix: limit openshift int test with tag

* refactor: commands to use simplifed, unified constructor

* fix ineffectual assignment lint error

* cleanup

* add repository to run command

* callout for forthcoming s2i builder impl

* lint errors

* re-add the deferred client factory

* remove setNamespaceFlag now that it is persistent

* avoid side-effect of global-mutating deploy tests

* reduce line-by-line difference for PR ease

* simplificaiton of tests and comment lines for further PR ease purposes

* reduce inconsequential differences for ease of PR

* tests to RootCommandConfig

* review comment updates

* fix lint errors

* replace stdlib Setenv in tests

Using t.Setenv will require an update to go1.17, which is out of scope
for this PR.

* pass ClientFactory throughout

* explicitly empty test command args

See https://github.com/spf13/cobra/pull/155

Errors can still be encountered when, for example, using precomiled
tests.  Explicitly setting constructed command args to the empty slice
ensures we avoid hitting any futher edge cases.
2022-03-30 00:58:46 +00:00
Matej Vasek 669329f02f
Improve error handling (#916)
* replaced plain `==` by `error.Is()`
* wrapping some more errors using `fmt.Errorf()`

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-22 17:18:17 -07:00
Luke Kingland 5a122c31e6
src: promote verbosity to constructor arg (#869)
* update root and version structure and help text

* fix: limit openshift int test with tag

* src: verbosity to constructor param

* fix misspelling

* fix merge error
2022-03-04 11:19:36 -08:00
Matej Vasek a2abfca3d3
src: error-less ctors (#818)
* src: no error ctors

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

* src: no error ctors

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-08 12:20:16 -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
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
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