You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2026/09/16 13:29:20 UTC
(camel-k) branch main updated (18483e7a8 -> 515d997f0)
This is an automated email from the ASF dual-hosted git repository.
squakez pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
from 18483e7a8 chore(deps): bump github.com/mattn/go-shellwords from 1.0.14 to 1.0.15
new 84b4e9d75 feat: kamel run --wait automatically switches phase target if dont-run-after-build specified; refs #6706
new 515d997f0 chore: minor suggestion
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
pkg/cmd/run.go | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
(camel-k) 01/02: feat: kamel run --wait automatically switches phase target if dont-run-after-build specified; refs #6706
Posted by pc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
squakez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 84b4e9d75d6a8e065b3eb9c8c47bde672ae81da1
Author: Matthew Hehir <he...@googlemail.com>
AuthorDate: Mon Jul 6 13:48:05 2026 +0000
feat: kamel run --wait automatically switches phase target if dont-run-after-build specified; refs #6706
---
pkg/cmd/run.go | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index f7ab595e3..b44a14129 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -79,7 +79,7 @@ func newCmdRun(rootCmdOptions *RootCmdOptions) (*cobra.Command, *runCmdOptions)
cmd.Flags().String("image", "", "An image built externally (ie, via CICD). Enabling it will skip the Integration build phase.")
cmd.Flags().StringArrayP("dependency", "d", nil, "A dependency that should be included, e.g., \"camel:mail\" for a Camel component, "+
"\"mvn:org.my:app:1.0\" for a Maven dependency")
- cmd.Flags().BoolP("wait", "w", false, "Wait for the integration to be running")
+ cmd.Flags().BoolP("wait", "w", false, "Wait for the integration to be running or built (if --dont-run-after-build is enabled)")
cmd.Flags().StringP("kit", "k", "", "The kit used to run the integration")
cmd.Flags().StringArrayP("property", "p", nil, "Add a runtime property or a local properties file from a path "+
"(syntax: [my-key=my-value|file:/path/to/my-conf.properties])")
@@ -126,9 +126,9 @@ type runCmdOptions struct {
*RootCmdOptions `json:"-"`
// Deprecated: won't be supported in the future
- Compression bool `mapstructure:"compression" yaml:",omitempty"`
- Wait bool `mapstructure:"wait" yaml:",omitempty"`
- Logs bool `mapstructure:"logs" yaml:",omitempty"`
+ Compression bool `mapstructure:"compression" yaml:",omitempty"`
+ Wait bool `mapstructure:"wait" yaml:",omitempty"`
+ Logs bool `mapstructure:"logs" yaml:",omitempty"`
// Deprecated: won't be supported in the future
Sync bool `mapstructure:"sync" yaml:",omitempty"`
// Deprecated: won't be supported in the future
@@ -382,15 +382,20 @@ func (o *runCmdOptions) run(cmd *cobra.Command, args []string) error {
})
}
if o.Wait || o.Dev {
+ phase := v1.IntegrationPhaseRunning
+ if o.DontRunAfterBuild {
+ phase = v1.IntegrationPhaseBuildComplete
+ }
+
for {
- integrationPhase, err := o.waitForIntegrationReady(cmd, c, integration)
- if err != nil {
- return err
+ integrationPhase, waitErr := o.waitForIntegrationPhase(cmd, c, integration, phase)
+ if waitErr != nil {
+ return waitErr
}
if integrationPhase == nil || *integrationPhase == v1.IntegrationPhaseError {
return fmt.Errorf("integration \"%s\" deployment failed", integration.Name)
- } else if *integrationPhase == v1.IntegrationPhaseRunning {
+ } else if *integrationPhase == phase {
break
}
@@ -443,7 +448,7 @@ func (o *runCmdOptions) postRun(cmd *cobra.Command, args []string) error {
return nil
}
-func (o *runCmdOptions) waitForIntegrationReady(cmd *cobra.Command, c client.Client, integration *v1.Integration) (*v1.IntegrationPhase, error) {
+func (o *runCmdOptions) waitForIntegrationPhase(cmd *cobra.Command, c client.Client, integration *v1.Integration, wanted v1.IntegrationPhase) (*v1.IntegrationPhase, error) {
handler := func(i *v1.Integration) bool {
//
// TODO when we add health checks, we should Wait until they are passed
@@ -452,7 +457,7 @@ func (o *runCmdOptions) waitForIntegrationReady(cmd *cobra.Command, c client.Cli
// TODO remove this log when we make sure that events are always created
fmt.Fprintf(cmd.OutOrStdout(), "Progress: integration %q in phase %s\n", integration.Name, string(i.Status.Phase))
}
- if i.Status.Phase == v1.IntegrationPhaseRunning || i.Status.Phase == v1.IntegrationPhaseError {
+ if i.Status.Phase == wanted || i.Status.Phase == v1.IntegrationPhaseError {
return false
}
(camel-k) 02/02: chore: minor suggestion
Posted by pc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
squakez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 515d997f061b809ad947c77eca2b313ccb9b08a8
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Wed Sep 16 12:05:07 2026 +0200
chore: minor suggestion
---
pkg/cmd/run.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index b44a14129..c089a8bc9 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -79,7 +79,7 @@ func newCmdRun(rootCmdOptions *RootCmdOptions) (*cobra.Command, *runCmdOptions)
cmd.Flags().String("image", "", "An image built externally (ie, via CICD). Enabling it will skip the Integration build phase.")
cmd.Flags().StringArrayP("dependency", "d", nil, "A dependency that should be included, e.g., \"camel:mail\" for a Camel component, "+
"\"mvn:org.my:app:1.0\" for a Maven dependency")
- cmd.Flags().BoolP("wait", "w", false, "Wait for the integration to be running or built (if --dont-run-after-build is enabled)")
+ cmd.Flags().BoolP("wait", "w", false, "Wait for the integration to be running or built")
cmd.Flags().StringP("kit", "k", "", "The kit used to run the integration")
cmd.Flags().StringArrayP("property", "p", nil, "Add a runtime property or a local properties file from a path "+
"(syntax: [my-key=my-value|file:/path/to/my-conf.properties])")