Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven build is marked as a success even if docker image build has failed #172

Open
alexey-danilov opened this issue May 18, 2015 · 4 comments

Comments

@alexey-danilov
Copy link

Here is the output of maven build:

INFO] DOCKER> Creating image [#########]
[INFO] Building tar: #########
[ERROR] DOCKER> Error building image: ${project.groupId}-${project.artifactId}.jar: no such file or directory
[ERROR] DOCKER> ${project.groupId}-${project.artifactId}.jar: no such file or directory
[INFO] 
[INFO] --- docker-maven-plugin:0.11.3:push (build-images) @ ######### ---
[INFO] DOCKER> ... The push refers to a repository [#########] (len: 1)
[INFO] DOCKER> ... Sending image list
[INFO] DOCKER> ... Pushing repository ######### (1 tags)
[INFO] DOCKER> ... Image 511136ea3c5a already pushed, skipping
[INFO] DOCKER> ... Image 5b12ef8fd570 already pushed, skipping
[INFO] DOCKER> ... Image 4a77ba233b6c already pushed, skipping
[INFO] DOCKER> ... Image c7b7993cc08e already pushed, skipping
[INFO] DOCKER> ... Image 87e5b6b3ccc1 already pushed, skipping
[INFO] DOCKER> ... Image e4c07c3478a9 already pushed, skipping
[INFO] DOCKER> ... Image 1fdc41be6d55 already pushed, skipping
[INFO] DOCKER> ... Image a2bba56f013c already pushed, skipping
[INFO] DOCKER> ... Image d4a8df3491ee already pushed, skipping
[INFO] DOCKER> ... Image 17f65a94cc53 already pushed, skipping
[INFO] DOCKER> ... Image 3ad2110f151a already pushed, skipping
[INFO] DOCKER> ... Image 768772d19c9e already pushed, skipping
[INFO] DOCKER> ... Image ea02d2b66e48 already pushed, skipping
[INFO] DOCKER> ... Image 95b1d312a3a3 already pushed, skipping
[INFO] DOCKER> ... Image b6e2d07828f8 already pushed, skipping
[INFO] DOCKER> ... Image 3da73552ea79 already pushed, skipping
[INFO] DOCKER> ... Image 2a51062a0819 already pushed, skipping
[INFO] DOCKER> ... Pushing tag for rev [95b1d312a3a3] on {#########}

...

[INFO] BUILD SUCCESS

In this instance I was trying to refer to maven properties, like ${project.groupId}, within the dockerfile. As it turns out, this is not supported by the plugin directly, which is fine... but would be nice if plugin failed the build on such a critical error.

@rhuss
Copy link
Collaborator

rhuss commented May 18, 2015

Which version of the plugin are you using ?

@rhuss
Copy link
Collaborator

rhuss commented May 18, 2015

There has been lately a fix for #167 been added in release 0.11.4
If you are using a lower version please try to update.

@alexey-danilov
Copy link
Author

Thanks. I have updated the version of plugin. If the problem persists, I will let you know.

@mwringe
Copy link

mwringe commented Jun 24, 2015

I have the build passing when using 0.12.0, even when the docker command has failed:

[WARNING] DOCKER> Couldn't parse answer chunk '{"stream":"Trying to pull repository docker.io/busybox ..."}
': org.json.JSONException: JSONObject["status"] not found.
[INFO] DOCKER> ... failed
[ERROR] DOCKER> Get https://index.docker.io/v1/repositories/library/busybox/images: dial tcp: lookup index.docker.io: no such host

leusonmario pushed a commit to leusonmario/docker-maven-plugin that referenced this issue Aug 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants