I ran into problems with 'new-project' and 'use-project' when it is trying to install the operator if it does not exist into the project.
Here is the error:
Error while deploying Kogito Operator via template yaml files: Error reading file crds/app_v1alpha1_kogitoapp_crd.yaml: stat /home/tradisso/projects/kogito/deploy/crds/app_v1alpha1_kogitoapp_crd.yaml: no such file or directory
It seems the deployment files are not packed into the binary.
Digging into the project, it is a bug in the 'hack/go-build-cli.sh' script.
Indeed, when running the command `packr2 -v` at the root of the project, I get:
_*parser.Parser#NewFromRoots options="
{\"IgnoreImports\":false,\"Ignores\":null}" roots="\"/home/tradisso/projects/kogito/kogito-cloud-operator\"]"_
*parser.Parser#NewFromRoots walking=/home/tradisso/projects/kogito/kogito-cloud-operator
*parser.Parser#NewFromRoots found prospects=0
So no file will be packed from there.
I needed to go to 'cmd/kogito' folder and run the `packr2 -v` command there to be sure the files are scanned.
I think we should change the shell script (go-build-cli.sh) to run the `packr2 -v` and `packr2 clean -v` commands into the 'cmd/kogito' folder.
What do you think ?
- is related to
-
KOGITO-485 Release Kogito CLI 0.5.1 for Devoxx BE
-
- Closed
-