apache / camel-karavan

Apache Camel Karavan a Low-code Data Integration Platform
https://camel.apache.org
Apache License 2.0
436 stars 146 forks source link

Bug: Building an Image before Pushing to git will fail #1356

Closed predic8 closed 1 month ago

predic8 commented 1 month ago

Describe the bug

Building an image before executing a git push will fail.

Steps to reproduce the behavior

To reproduce create a new project then create a route. Immediately after that trying to build the image will produce:

[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/karavan/code). Please verify you invoked Maven from the correct directory. -> [Help 1]
org.apache.maven.lifecycle.MissingProjectException: The goal you specified requires a project to execute but there is no POM in this directory (/karavan/code). Please verify you invoked Maven from the correct directory.
   at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:80)
   at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
   at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
   at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
   at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
   at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
   at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)

Maybe the cause is the $TAG variable in build.shthat has the value -.

Then commit the changes of the project to git. $TAG is now something like 60b4d1c and the build will work.

Workaround: Commit changes first then build the image

Variant

Web Application

Container Management (if applicable)

Docker

Operating System (if applicable)

MacOS

Version

4.7.0

Relevant log output

No response

mgubaidullin commented 1 month ago

Works as expected. Developer workflow:

  1. Design and run in DevMode.
  2. When finish development, push to git repository and Build Image