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
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:
Maybe the cause is the $TAG variable in
build.sh
that 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