* Use command instad of script in some tkn tasks
The "script" requires /bin/sh present in the image.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* Add s2i-generate command to func-util image
The command encompasses some logic previously implemented as shell
script defined in tekton task. This allows us to remove sh/shell from
the func-util image.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* Make func-util image "FROM scratch"
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* Change func-utils image tag latest->v2
Since there are backward incompatible changes we must not change how
'latest' tag work (at least for some time).
For this reason we change tag to v2, so newer versions of func use that
and older use 'latest' that is compatible with them.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* Fixed pod readiness check
Detect also if pod did not exited prematurely.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* Removed dependency on sh/tar from alpine image
This commit removes depencency on sh and tar binaries by implementing
the logic in our func-util binary.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* run test for digested img
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
* misspell
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
---------
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
* simplify more
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
* fix
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
* fix creds test
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
* name fix
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
* naming
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
---------
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
* Fix test failures in OCP prow CI
Ensure that ServeRepo() make copy of repo from ./testdata and serves the
repo from that copy.
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* fixup: typo
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
---------
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* migrate
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
* migrate more
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
* sort imports
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
---------
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
* Prepare util image to accomodate multiple cmds
As of now func-util image has only one command of our own -- "deploy".
This commits prepares grounds for one additional command named "scaffolding".
The commands will be implemented in one binary and dispatched over
argv[0] using symlinks. Kinda like busybox does.
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* Add scaffolding for on-cluster build
Added new build step in tekton pipeline that scaffolds main() for Go
porject when using s2i builder.
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* Better docker build caching
This will cache dependencies between docker builds.
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* fixup: perms
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* fixup: remove broken check
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* fixup: remove test because of 'no space left on device'
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* Make func-util rootfull
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
---------
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* feat: embed tkn tasks in func binary
Embed Tekton tasks for direct on cluster build.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* feat: embed tkn tasks in func binary
Embed Tekton tasks for PaC build.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* feat: added tkn-tasks sub-command
This new command prints tektons tasks in form of multi-document yaml,
these tekton tasks may requird to be installed for some advanced
functionality.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* chore: remove unused files
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* feat: make deployer image settable via linker
Signed-off-by: Matej Vašek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* fix: namespace logic cleanup and test isolation
- Pulls logic for defaulting to active namespace (K8S) moved UP to CLI during
flag default calculation.
- Pushes logic of deciding between f.Namespace vs f.Deploy.Namespace down into
implementations.
- Updates some tests which needed to have their environment cleared.
- Refactors Pipelines tests to use client API.
- Removes namespaces as a state variable all structures, instead passing as
an argument.
- Moves FromTempDirectory to testing package for use outside cmd.
* fix spelling errors
* fix: pipelines remover always returned (empty) error
* update tekton namespace handling
* fix: remove deprecated GitLab config: max_concurrency
* The socat/tar image is now build in GH Actions.
* We use new tiny deploy binary for deployment instead of whole func.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix env var casing otherwise flags with hyphens will continue to have hyphens
* Introduce an --registry-insecure flag
* fix build tests
* fix TestList
* fix insecure (http) push
* forced namespace change, deletes old func, kind works
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* new .deploy.image field
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* building
* building
* add first iteration of complete functionality with f.Build.Image and f.Deploy.Image that STILL contains a workaround for image digest which is populated on Push instead of Build
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* base tests fixes for compile
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix base tests2 for now, integration test has a possible TODO
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* new generated schema
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix some tests using .Image and create new test
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* remove nested .func
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* get rid of test
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* remove my debug test
* fix namespace change test
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix pipeline run to use .Deploy.Image
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix TestDeploy_ConfigApplied and change pipelines image being used
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix some tests
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix actions - return value, configApplied and registry on subsequent deploy different
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* update empty image in tests issue
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix client.Apply tests with passing image value to .Deploy after push
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* openshift override on namespace change forced, remove useless print
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* printing fixes, reviewdog, buildConfig return
* fix pipelines test by feeding image name to .Deploy, comments
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* update more tests
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* new test, comment
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* misspell
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* remove unnecessary comments
* fix from review
* namespace updated with 2 fields; new error definitions; deploy functionality cleanup
* remove k8s service host var in test
* error definition; fix client tests; cli delete fixup
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* new schema
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* namespace fixes; remover arguments fix
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* delete_test cmd
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* schema, new local remote flag instead of deploy
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix test to have now required namespace
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* add namespace check, test action
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix integration deploy test, comments
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix wrongly removed namespace
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* small changes to remover and ns added to its tests
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* test moving logic to client
* fix deploy bug, remove verbose for better logs
* pipelines, clean remover
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* newline
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* namespace required in remover, and fixed remote deployer - returns ns
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix integ test for pipelines.Run
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* cleanup
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* registry update change on deploy, some prints
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* new deploy tests and mock update
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* new tests, ns determination in mocks
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* deploy digested img doesnt populate build
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* comments
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* remove todo
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
---------
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* We do not want to add duplicated subscriptiosn
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* new unit test
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
---------
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* fix: docker registry/repository parsing
Use go-containerregistry to do parsing.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix: use kebab-case instead of camelCase
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix: use kebab-case instead of camelCase
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* 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>
* Revert "src: Use jobs not plain pods for auxiliary tasks (#1857)"
This reverts commit cb6f33d924.
* refactor: move code from openshift
This is needed to avoid circular package dependencies.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix: set pod SC only on non-OpenShift
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>