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

Image building fails with an unhelpful error message when building an image from a jar that includes the launch script #22223

Closed
ta7uw opened this issue Jul 4, 2020 · 3 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@ta7uw
Copy link
Contributor

ta7uw commented Jul 4, 2020

I tried to execute bootBuildImage task in gradle multi-module project, but I couldn't create the image because the task failed.
I checked that bootBuildImage task in a single gradle project succeeded in my local machine.
Is executing in multi-module project the cause of the failure?

Spring Boot: 2.3.1.RELEASE
Gradle: 6.4.1

$ ./gradlew web:bootBuildImage
> Task :web:bootBuildImage
Building image 'web-app:latest'

 > Pulling builder image 'gcr.io/paketo-buildpacks/builder:base-platform-api-0.3' ..................................................
 > Pulled builder image 'gcr.io/paketo-buildpacks/builder@sha256:c8a4e4b7a6fe3aaeb4faa7731fcacae8fb91ea90e220506970e12c5a0515f3d4'
 > Pulling run image 'gcr.io/paketo-buildpacks/run:base-cnb' ..................................................
 > Pulled run image 'cloudfoundry/run@sha256:1a37642c23a2e44231bdbcfca228d20f09425ff312736e96252c7299520e5044'
 > Executing lifecycle version v0.8.0
 > Using build cache volume 'pack-cache-8ffa72a0e7c4.build'

 > Running creator
    [creator]     ===> DETECTING
    [creator]     ERROR: No buildpack groups passed detection.
    [creator]     ERROR: Please check that you are running against the correct path.
    [creator]     ERROR: failed to detect: failed to detect: no buildpacks participating

> Task :web:bootBuildImage FAILED

FAILURE: Build failed with an exception.


@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 4, 2020
@wilkinsona
Copy link
Member

Thanks for the report. Unfortunately, we can’t accurately diagnose the problem without know more about your build and its web project. It would appear that the web project doesn’t produce a binary that any of the builder’s buildpacks recognise.

If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Jul 4, 2020
@ta7uw
Copy link
Contributor Author

ta7uw commented Jul 4, 2020

It would appear that the web project doesn’t produce a binary that any of the builder’s buildpacks recognise.

The bootJar task in web project includes launchScript.
I could create the image by excluding launchScript.

Thanks for your support!

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Jul 4, 2020
@wilkinsona wilkinsona changed the title BootBuildImage task fails because no buildpack groups passed detection Image building fails with an in helpful error message when building an image from a jar that includes the launch script Jul 4, 2020
@wilkinsona
Copy link
Member

Thanks. Glad to hear that you figured it out. I think we should fail earlier and improve the error message so that it’s more obvious what the problem is.

@wilkinsona wilkinsona added type: bug A general bug and removed status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged labels Jul 4, 2020
@wilkinsona wilkinsona added this to the 2.3.x milestone Jul 4, 2020
@wilkinsona wilkinsona changed the title Image building fails with an in helpful error message when building an image from a jar that includes the launch script Image building fails with an unhelpful error message when building an image from a jar that includes the launch script Jul 6, 2020
@scottfrederick scottfrederick self-assigned this Jul 8, 2020
@scottfrederick scottfrederick modified the milestones: 2.3.x, 2.3.2 Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants