Skip to content

Image is not built when a buildpack is used #25378

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

Closed
eddumelendez opened this issue Feb 20, 2021 · 4 comments
Closed

Image is not built when a buildpack is used #25378

eddumelendez opened this issue Feb 20, 2021 · 4 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@eddumelendez
Copy link
Contributor

The snippet below is my configuration at spring-boot-maven-plugin. The purpose is to build an image using amazon-corretto instead bellsoft liberica

<image>
	<builder>gcr.io/paketo-buildpacks/builder:base</builder>
	<buildpacks>
		<buildpack>gcr.io/paketo-buildpacks/amazon-corretto:latest</buildpack>
		<buildpack>gcr.io/paketo-buildpacks/maven:latest</buildpack>
		<buildpack>gcr.io/paketo-buildpacks/executable-jar:latest</buildpack>
		<buildpack>gcr.io/paketo-buildpacks/spring-boot:latest</buildpack>
	</buildpacks>
</image>

When running ./mvnw spring-boot:build-image I got the error attached below

[INFO] --- spring-boot-maven-plugin:2.5.0-M2:build-image (default-cli) @ hello-demo ---
[INFO] Building image 'docker.io/library/hello-demo:0.0.1-SNAPSHOT'
[INFO]
[INFO]  > Executing lifecycle version v0.10.2
[INFO]  > Using build cache volume 'pack-cache-56b24530bea3.build'
[INFO]
[INFO]  > Running creator
[INFO]     [creator]     ===> DETECTING
[INFO]     [creator]     ======== Results ========
[INFO]     [creator]     pass: paketo-buildpacks/[email protected]
[INFO]     [creator]     Resolving plan... (try #1)
[INFO]     [creator]     fail: paketo-buildpacks/[email protected] provides unused jdk
[INFO]     [creator]     Resolving plan... (try #2)
[INFO]     [creator]     fail: paketo-buildpacks/[email protected] provides unused jdk
[INFO]     [creator]     Resolving plan... (try #3)
[INFO]     [creator]     fail: paketo-buildpacks/[email protected] provides unused jre
[INFO]     [creator]     ======== Results ========
[INFO]     [creator]     fail: paketo-buildpacks/[email protected]
[INFO]     [creator]     ======== Results ========
[INFO]     [creator]     pass: paketo-buildpacks/[email protected]
[INFO]     [creator]     Resolving plan... (try #1)
[INFO]     [creator]     fail: paketo-buildpacks/[email protected] requires jre
[INFO]     [creator]     ======== Results ========
[INFO]     [creator]     pass: paketo-buildpacks/[email protected]
[INFO]     [creator]     Resolving plan... (try #1)
[INFO]     [creator]     fail: paketo-buildpacks/[email protected] requires jvm-application
[INFO]     [creator]     ERROR: No buildpack groups passed detection.
[INFO]     [creator]     ERROR: Please check that you are running against the correct path.
[INFO]     [creator]     ERROR: failed to detect: no buildpacks participating
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.918 s
[INFO] Finished at: 2021-02-19T16:33:39-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.0-M2:build-image (default-cli) on project hello-demo: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.5.0-M2:build-image failed: Builder lifecycle 'creator' failed with status code 100 -> [Help 1]

However, running pack build hello-demo --builder gcr.io/paketo-buildpacks/builder:base --buildpack paketo-buildpacks/amazon-corretto --buildpack paketo-buildpacks/maven --buildpack paketo-buildpacks/executable-jar --buildpack paketo-buildpacks/spring-boot works.

spring-boot version: 2.5.0-M2

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 20, 2021
@scottfrederick scottfrederick self-assigned this Feb 22, 2021
@scottfrederick scottfrederick added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 22, 2021
@scottfrederick scottfrederick added this to the 2.5.x milestone Feb 22, 2021
@scottfrederick
Copy link
Contributor

@eddumelendez I have re-created this. The problem happens when you list multiple buildpacks that must detect as a group and depend on each other (for example, maven, executable-jar, and spring-boot buildpacks rely on a buildpack providing a JDK/JRE). I'm working on the fix.

@jackey35
Copy link

jackey35 commented Aug 24, 2022

i have same issue.

 <builder>gcr.io/paketo-buildpacks/builder:base</builder>
                        <buildpacks>
                            <buildpack>gcr.io/paketo-buildpacks/oracle</buildpack>
                            <buildpack>gcr.io/paketo-buildpacks/executable-jar</buildpack>
                            <buildpack>gcr.io/paketo-buildpacks/spring-boot</buildpack>
                        </buildpacks>
[INFO] --- spring-boot-maven-plugin:2.7.1:build-image (default-cli) @xxx-service ---
[INFO] Building image 'docker.io/ostock/xxx-service:latest'
[INFO]
[INFO]  > Executing lifecycle version v0.14.1
[INFO]  > Using build cache volume 'pack-cache-c33645941115.build'
[INFO]
[INFO]  > Running creator
[INFO]     [creator]     Restoring data for SBOM from previous image
[INFO]     [creator]     ===> DETECTING
[INFO]     [creator]     ERROR: No buildpack groups passed detection.
[INFO]     [creator]     ERROR: Please check that you are running against the correct path.
[INFO]     [creator]     ERROR: failed to detect: no buildpacks participating
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10.726 s
[INFO] Finished at: 2022-08-24T11:55:40+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.7.1:build-image (default-cli) on project xx-service: Exec
ution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.7.1:build-image failed: Builder lifecycle 'creator' failed with status code 20 -> [Help 1]

can anyone help me?

@snicoll
Copy link
Member

snicoll commented Aug 24, 2022

@jackey35 I am not sure this is the same issue. The status code is different and so are the errors. Please consider asking the buildpacks community.

@jackey35
Copy link

@snicoll Thank you.

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

5 participants