You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "treblereel (via GitHub)" <gi...@apache.org> on 2025/05/19 04:22:45 UTC
[PR] [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
treblereel opened a new pull request, #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144
…s profile
issue: https://github.com/apache/incubator-kie-tools/issues/3112
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2098168853
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -65,13 +78,36 @@ func NewCreateCommand() *cobra.Command {
cmd.Flags().StringP("extension", "e", "", "On Quarkus projects, setup project custom Maven extensions, separated with a comma.")
cmd.Flags().StringP("quarkus-platform-group-id", "G", quarkusDependencies.QuarkusPlatformGroupId, "On Quarkus projects, setup project group id.")
cmd.Flags().StringP("quarkus-version", "V", quarkusDependencies.QuarkusVersion, "On Quarkus projects, setup the project version.")
+ cmd.Flags().StringP("profile", "p", "dev", "Specify a profile to use for the new Quarkus project (default: dev)")
+ cmd.Flags().BoolP("with-persistence", "w", false, "Add persistence support to the project (default: false)")
+
cmd.SetHelpFunc(common.DefaultTemplatedHelp)
return cmd
}
-func runCreate() error {
- cfg, err := runCreateCmdConfig()
+type MavenDependency struct {
+ GroupId string
+ ArtifactId string
+}
+
+var ExtensionPerProfile = map[string][]MavenDependency{
+ apiMetadata.GitOpsProfile.String(): {
+ MavenDependency{"org.kie","kie-addons-quarkus-persistence-jdbc"},
Review Comment:
We should start thinking about adding a configuration locally. The groupId here might change downstream, for example.
##########
packages/kn-plugin-workflow/pkg/common/checks.go:
##########
@@ -197,3 +198,23 @@ func CheckProjectName(name string) (err error) {
}
return
}
+
+func IsValidProfile(profile string) error {
+ var allProfiles = []apiMetadata.ProfileType{
+ apiMetadata.DevProfile,
+ apiMetadata.ProdProfile,
Review Comment:
This one has been deprecated. Can you remove it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "masayag (via GitHub)" <gi...@apache.org>.
masayag commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2113693125
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -50,13 +56,20 @@ func NewCreateCommand() *cobra.Command {
# Create a project with additional extensions
# You can add multiple extensions by separating them with a comma
{{.Name}} create --extensions kogito-addons-quarkus-persistence-postgresql,quarkus-core
+
+ # Specify a profile to use for the new Quarkus project (default: dev)
Review Comment:
Do you think the valid values for the profile should be listed here? (e.g. dev/preview/gitops) otherwise, the profiles will be listed only in case of a wrong value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2098383616
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -65,13 +78,36 @@ func NewCreateCommand() *cobra.Command {
cmd.Flags().StringP("extension", "e", "", "On Quarkus projects, setup project custom Maven extensions, separated with a comma.")
cmd.Flags().StringP("quarkus-platform-group-id", "G", quarkusDependencies.QuarkusPlatformGroupId, "On Quarkus projects, setup project group id.")
cmd.Flags().StringP("quarkus-version", "V", quarkusDependencies.QuarkusVersion, "On Quarkus projects, setup the project version.")
+ cmd.Flags().StringP("profile", "p", "dev", "Specify a profile to use for the new Quarkus project (default: dev)")
+ cmd.Flags().BoolP("with-persistence", "w", false, "Add persistence support to the project (default: false)")
+
cmd.SetHelpFunc(common.DefaultTemplatedHelp)
return cmd
}
-func runCreate() error {
- cfg, err := runCreateCmdConfig()
+type MavenDependency struct {
+ GroupId string
+ ArtifactId string
+}
+
+var ExtensionPerProfile = map[string][]MavenDependency{
+ apiMetadata.GitOpsProfile.String(): {
+ MavenDependency{"org.kie","kie-addons-quarkus-persistence-jdbc"},
+ MavenDependency{"io.quarkus","quarkus-agroal"},
+ MavenDependency{"io.quarkus","quarkus-jdbc-postgresql"},
Review Comment:
@masayag we use bom's so it's ok not have versions here
```
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-bom</artifactId>
<version>${kie.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#issuecomment-3020218807
@ricardozanini ^^
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2098245833
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -65,13 +78,36 @@ func NewCreateCommand() *cobra.Command {
cmd.Flags().StringP("extension", "e", "", "On Quarkus projects, setup project custom Maven extensions, separated with a comma.")
cmd.Flags().StringP("quarkus-platform-group-id", "G", quarkusDependencies.QuarkusPlatformGroupId, "On Quarkus projects, setup project group id.")
cmd.Flags().StringP("quarkus-version", "V", quarkusDependencies.QuarkusVersion, "On Quarkus projects, setup the project version.")
+ cmd.Flags().StringP("profile", "p", "dev", "Specify a profile to use for the new Quarkus project (default: dev)")
+ cmd.Flags().BoolP("with-persistence", "w", false, "Add persistence support to the project (default: false)")
+
cmd.SetHelpFunc(common.DefaultTemplatedHelp)
return cmd
}
-func runCreate() error {
- cfg, err := runCreateCmdConfig()
+type MavenDependency struct {
+ GroupId string
+ ArtifactId string
+}
+
+var ExtensionPerProfile = map[string][]MavenDependency{
+ apiMetadata.GitOpsProfile.String(): {
+ MavenDependency{"org.kie","kie-addons-quarkus-persistence-jdbc"},
+ MavenDependency{"io.quarkus","quarkus-agroal"},
+ MavenDependency{"io.quarkus","quarkus-jdbc-postgresql"},
Review Comment:
IIRC once we build the CLI, we have the versions set in the config.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "masayag (via GitHub)" <gi...@apache.org>.
masayag commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2154274939
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -50,13 +56,20 @@ func NewCreateCommand() *cobra.Command {
# Create a project with additional extensions
# You can add multiple extensions by separating them with a comma
{{.Name}} create --extensions kogito-addons-quarkus-persistence-postgresql,quarkus-core
+
+ # Specify a profile to use for the new Quarkus project (default: dev). Available options: dev, preview, gitops.
+ {{.Name}} create --profile=<profile_name>
+
+ # Add persistence support to the project (default: false)
+ {{.Name}} create --with-persistence
Review Comment:
Just to pinpoint on the differences:
Having the dependencies in the pom.xml are good for local development.
But when building with the builder image using the Dockerfile, the QUARKUS_EXTENSION argument is used to specify the dependencies and the pom.xml is the one internal to the builder image.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "masayag (via GitHub)" <gi...@apache.org>.
masayag commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2152808519
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -50,13 +56,20 @@ func NewCreateCommand() *cobra.Command {
# Create a project with additional extensions
# You can add multiple extensions by separating them with a comma
{{.Name}} create --extensions kogito-addons-quarkus-persistence-postgresql,quarkus-core
+
+ # Specify a profile to use for the new Quarkus project (default: dev). Available options: dev, preview, gitops.
+ {{.Name}} create --profile=<profile_name>
+
+ # Add persistence support to the project (default: false)
+ {{.Name}} create --with-persistence
Review Comment:
No, my question was about the generated Dockerfile:
In our case, we specify the extensions in the Dockerfile, e.g.
https://github.com/rhdhorchestrator/serverless-workflows/blob/main/pipeline/workflow-builder.Dockerfile#L24
```
ARG QUARKUS_EXTENSIONS=io.quarkiverse.openapi.generator:quarkus-openapi-generator:2.9.1-lts,org.kie:kie-addons-quarkus-monitoring-sonataflow,org.kie:kogito-addons-quarkus-jobs-knative-eventing,org.kie:kie-addons-quarkus-persistence-jdbc,io.quarkus:quarkus-jdbc-postgresql:3.15.4.redhat-00001,io.quarkus:quarkus-agroal:3.15.4.redhat-00001
```
However, in the generated Dockerfile files there is no mention for that QUARKUS_EXTENSIONS argument.
This makes me wonder how the builder image is being used to build the images.
I thought that for the gitops profile we'll provide a Dockerfile that relies on a builder image.
According to the `gitops` profile documentation this Dockerfile should be used:
https://sonataflow.org/serverlessworkflow/main/cloud/operator/gitops-profile.html#_building_workflow_container_images
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "masayag (via GitHub)" <gi...@apache.org>.
masayag commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2152571136
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -50,13 +56,20 @@ func NewCreateCommand() *cobra.Command {
# Create a project with additional extensions
# You can add multiple extensions by separating them with a comma
{{.Name}} create --extensions kogito-addons-quarkus-persistence-postgresql,quarkus-core
+
+ # Specify a profile to use for the new Quarkus project (default: dev). Available options: dev, preview, gitops.
+ {{.Name}} create --profile=<profile_name>
+
+ # Add persistence support to the project (default: false)
+ {{.Name}} create --with-persistence
Review Comment:
shouldn't setting the flag `--with-persistence=true` enable also the flag
`--extensions kogito-addons-quarkus-persistence-postgresql`?
or is it needed to specify each individually? or is the addition of the maven dependency makes the quarkus persistence extension redundant?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#issuecomment-2893115865
for test run `kn workflow quarkus create --profile=gitops --with-persistence`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini merged PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2098564168
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -65,13 +78,36 @@ func NewCreateCommand() *cobra.Command {
cmd.Flags().StringP("extension", "e", "", "On Quarkus projects, setup project custom Maven extensions, separated with a comma.")
cmd.Flags().StringP("quarkus-platform-group-id", "G", quarkusDependencies.QuarkusPlatformGroupId, "On Quarkus projects, setup project group id.")
cmd.Flags().StringP("quarkus-version", "V", quarkusDependencies.QuarkusVersion, "On Quarkus projects, setup the project version.")
+ cmd.Flags().StringP("profile", "p", "dev", "Specify a profile to use for the new Quarkus project (default: dev)")
+ cmd.Flags().BoolP("with-persistence", "w", false, "Add persistence support to the project (default: false)")
+
cmd.SetHelpFunc(common.DefaultTemplatedHelp)
return cmd
}
-func runCreate() error {
- cfg, err := runCreateCmdConfig()
+type MavenDependency struct {
+ GroupId string
+ ArtifactId string
+}
+
+var ExtensionPerProfile = map[string][]MavenDependency{
+ apiMetadata.GitOpsProfile.String(): {
+ MavenDependency{"org.kie","kie-addons-quarkus-persistence-jdbc"},
Review Comment:
@treblereel I agree, can you do create it?
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -65,13 +78,36 @@ func NewCreateCommand() *cobra.Command {
cmd.Flags().StringP("extension", "e", "", "On Quarkus projects, setup project custom Maven extensions, separated with a comma.")
cmd.Flags().StringP("quarkus-platform-group-id", "G", quarkusDependencies.QuarkusPlatformGroupId, "On Quarkus projects, setup project group id.")
cmd.Flags().StringP("quarkus-version", "V", quarkusDependencies.QuarkusVersion, "On Quarkus projects, setup the project version.")
+ cmd.Flags().StringP("profile", "p", "dev", "Specify a profile to use for the new Quarkus project (default: dev)")
+ cmd.Flags().BoolP("with-persistence", "w", false, "Add persistence support to the project (default: false)")
+
cmd.SetHelpFunc(common.DefaultTemplatedHelp)
return cmd
}
-func runCreate() error {
- cfg, err := runCreateCmdConfig()
+type MavenDependency struct {
+ GroupId string
+ ArtifactId string
+}
+
+var ExtensionPerProfile = map[string][]MavenDependency{
+ apiMetadata.GitOpsProfile.String(): {
+ MavenDependency{"org.kie","kie-addons-quarkus-persistence-jdbc"},
Review Comment:
@treblereel I agree, can you create it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2098385211
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -65,13 +78,36 @@ func NewCreateCommand() *cobra.Command {
cmd.Flags().StringP("extension", "e", "", "On Quarkus projects, setup project custom Maven extensions, separated with a comma.")
cmd.Flags().StringP("quarkus-platform-group-id", "G", quarkusDependencies.QuarkusPlatformGroupId, "On Quarkus projects, setup project group id.")
cmd.Flags().StringP("quarkus-version", "V", quarkusDependencies.QuarkusVersion, "On Quarkus projects, setup the project version.")
+ cmd.Flags().StringP("profile", "p", "dev", "Specify a profile to use for the new Quarkus project (default: dev)")
+ cmd.Flags().BoolP("with-persistence", "w", false, "Add persistence support to the project (default: false)")
+
cmd.SetHelpFunc(common.DefaultTemplatedHelp)
return cmd
}
-func runCreate() error {
- cfg, err := runCreateCmdConfig()
+type MavenDependency struct {
+ GroupId string
+ ArtifactId string
+}
+
+var ExtensionPerProfile = map[string][]MavenDependency{
+ apiMetadata.GitOpsProfile.String(): {
+ MavenDependency{"org.kie","kie-addons-quarkus-persistence-jdbc"},
Review Comment:
in this case, it's better to create an issue
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2152775371
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -50,13 +56,20 @@ func NewCreateCommand() *cobra.Command {
# Create a project with additional extensions
# You can add multiple extensions by separating them with a comma
{{.Name}} create --extensions kogito-addons-quarkus-persistence-postgresql,quarkus-core
+
+ # Specify a profile to use for the new Quarkus project (default: dev). Available options: dev, preview, gitops.
+ {{.Name}} create --profile=<profile_name>
+
+ # Add persistence support to the project (default: false)
+ {{.Name}} create --with-persistence
Review Comment:
@masayag
`--with-persistence=true` adds the following extensions:
- kie-addons-quarkus-persistence-jdbc
- quarkus-agroal
- quarkus-jdbc-postgresql
Do you mean that I also have to include `kogito-addons-quarkus-persistence-postgresql` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2152847231
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -50,13 +56,20 @@ func NewCreateCommand() *cobra.Command {
# Create a project with additional extensions
# You can add multiple extensions by separating them with a comma
{{.Name}} create --extensions kogito-addons-quarkus-persistence-postgresql,quarkus-core
+
+ # Specify a profile to use for the new Quarkus project (default: dev). Available options: dev, preview, gitops.
+ {{.Name}} create --profile=<profile_name>
+
+ # Add persistence support to the project (default: false)
+ {{.Name}} create --with-persistence
Review Comment:
@masayag I add these three deps directly into the pom.xml
Ok, I got your point, let me double check
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2152847231
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -50,13 +56,20 @@ func NewCreateCommand() *cobra.Command {
# Create a project with additional extensions
# You can add multiple extensions by separating them with a comma
{{.Name}} create --extensions kogito-addons-quarkus-persistence-postgresql,quarkus-core
+
+ # Specify a profile to use for the new Quarkus project (default: dev). Available options: dev, preview, gitops.
+ {{.Name}} create --profile=<profile_name>
+
+ # Add persistence support to the project (default: false)
+ {{.Name}} create --with-persistence
Review Comment:
@masayag I add these three deps directly into the pom.xml
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "masayag (via GitHub)" <gi...@apache.org>.
masayag commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2152571136
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -50,13 +56,20 @@ func NewCreateCommand() *cobra.Command {
# Create a project with additional extensions
# You can add multiple extensions by separating them with a comma
{{.Name}} create --extensions kogito-addons-quarkus-persistence-postgresql,quarkus-core
+
+ # Specify a profile to use for the new Quarkus project (default: dev). Available options: dev, preview, gitops.
+ {{.Name}} create --profile=<profile_name>
+
+ # Add persistence support to the project (default: false)
+ {{.Name}} create --with-persistence
Review Comment:
shouldn't setting the flag `--with-persistence=true` enable also the flag
`--extensions kogito-addons-quarkus-persistence-postgresql`?
or is it needed to specify each individually?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#issuecomment-3006197542
After discussing with @masayag, I removed
```
quarkus create --profile=gitops --with-persistance
```
To generate a Dockerfile with the current builder, it’s enough to run
```
create --with-persistence
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "treblereel (via GitHub)" <gi...@apache.org>.
treblereel commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2098387202
##########
packages/kn-plugin-workflow/pkg/common/checks.go:
##########
@@ -197,3 +198,23 @@ func CheckProjectName(name string) (err error) {
}
return
}
+
+func IsValidProfile(profile string) error {
+ var allProfiles = []apiMetadata.ProfileType{
+ apiMetadata.DevProfile,
+ apiMetadata.ProdProfile,
Review Comment:
hmm, apiMetadata.ProdProfile comes from sonataflow-operator, I would create a separate issue to remove it form sonataflow-operator and kn-workflow-plugin as well
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] kie-issues#3112 [kn-workflow] Provide an option to generate build resources for gitop… [incubator-kie-tools]
Posted by "masayag (via GitHub)" <gi...@apache.org>.
masayag commented on code in PR #3144:
URL: https://github.com/apache/incubator-kie-tools/pull/3144#discussion_r2098200368
##########
packages/kn-plugin-workflow/pkg/command/quarkus/create.go:
##########
@@ -65,13 +78,36 @@ func NewCreateCommand() *cobra.Command {
cmd.Flags().StringP("extension", "e", "", "On Quarkus projects, setup project custom Maven extensions, separated with a comma.")
cmd.Flags().StringP("quarkus-platform-group-id", "G", quarkusDependencies.QuarkusPlatformGroupId, "On Quarkus projects, setup project group id.")
cmd.Flags().StringP("quarkus-version", "V", quarkusDependencies.QuarkusVersion, "On Quarkus projects, setup the project version.")
+ cmd.Flags().StringP("profile", "p", "dev", "Specify a profile to use for the new Quarkus project (default: dev)")
+ cmd.Flags().BoolP("with-persistence", "w", false, "Add persistence support to the project (default: false)")
+
cmd.SetHelpFunc(common.DefaultTemplatedHelp)
return cmd
}
-func runCreate() error {
- cfg, err := runCreateCmdConfig()
+type MavenDependency struct {
+ GroupId string
+ ArtifactId string
+}
+
+var ExtensionPerProfile = map[string][]MavenDependency{
+ apiMetadata.GitOpsProfile.String(): {
+ MavenDependency{"org.kie","kie-addons-quarkus-persistence-jdbc"},
+ MavenDependency{"io.quarkus","quarkus-agroal"},
+ MavenDependency{"io.quarkus","quarkus-jdbc-postgresql"},
Review Comment:
Should the version be included as well?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org