paketo buildpacks via buildbootimage vs pack cli #276
Replies: 1 comment
-
The main difference between spring Boot build tools and The output from your pack build is a little confusing cause it says 11 buildpacks are detecting, but I definitely don't see that many running. It's not clear why from the info included. If you can post the full build output, that would be helpful. Aside from that, what I can say is that you get the process types from:
The spring-boot buildpack does not actually add process types. Most of the time for Spring Boot apps, that happens from executable-jar, because that's the default output format for Spring Boot apps. Since you're not seeing process types, you'd want to look most closely at the output for the buildpack you expect to contribute the process types and see what it's saying. Also, look closely at Gradle too if you build from source in the build container. This is because Gradle has to detect your output artifact, which is does by looking for certain patterns. It can in some case find the wrong thing, which can lead to confusing issues like this (if it finds nothing, you get an error). Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
In my root directory I have
gradle.properties
gradlew
gradlew.bat
settings.gradle
When I do ./gradlew buildbootimage
These things are getting participated
[creator] paketo-buildpacks/ca-certificates 3.6.8
[creator] paketo-buildpacks/bellsoft-liberica 10.5.5
[creator] paketo-buildpacks/syft 1.45.0
[creator] paketo-buildpacks/executable-jar 6.8.5
[creator] paketo-buildpacks/dist-zip 5.6.10
[creator] paketo-buildpacks/spring-boot 5.27.11
but while using the same builder in pack command
paketo-buildpacks/ca-certificates 3.6.8
paketo-buildpacks/bellsoft-liberica 10.5.5
paketo-buildpacks/syft 1.45.0
paketo-buildpacks/gradle 7.9.0
paketo-buildpacks/executable-jar 6.8.5
paketo-buildpacks/apache-tomcat 7.15.3
paketo-buildpacks/apache-tomee 1.8.2
paketo-buildpacks/liberty 4.0.4
paketo-buildpacks/dist-zip 5.6.10
paketo-buildpacks/spring-boot 5.27.11
Its executing the java and gradle buildpack then its not executing any spring boot and it is also not setting a process type why ?
logs:
[builder] Paketo Buildpack for Syft 1.32.1
[builder] https://github.com/paketo-buildpacks/syft
[builder] Downloading from https://github.com/anchore/syft/releases/download/v0.84.0/syft_0.84.0_linux_amd64.tar.gz
[builder] Verifying checksum
[builder] Writing env.build/SYFT_CHECK_FOR_APP_UPDATE.default
[builder]
[builder] Paketo Buildpack for Gradle 7.4.0
[builder] https://github.com/paketo-buildpacks/gradle
[builder] Build Configuration:
[builder] $BP_EXCLUDE_FILES colon separated list of glob patterns, matched source files are removed
[builder] $BP_GRADLE_ADDITIONAL_BUILD_ARGUMENTS the additionnal arguments (appended to BP_GRADLE_BUILD_ARGUMENTS) to pass to Gradle
[builder] $BP_GRADLE_BUILD_ARGUMENTS --no-daemon -Dorg.gradle.welcome=never assemble the arguments to pass to Gradle
[builder] $BP_GRADLE_BUILD_FILE the location of the main build config file, relative to the application root
[builder] $BP_GRADLE_BUILT_ARTIFACT build/libs/*.[jw]ar the built application artifact explicitly. Supersedes $BP_GRADLE_BUILT_MODULE
[builder] $BP_GRADLE_BUILT_MODULE the module to find application artifact in
[builder] $BP_GRADLE_INIT_SCRIPT_PATH the path to a Gradle init script file
[builder] $BP_INCLUDE_FILES colon separated list of glob patterns, matched source files are included
[builder] $BP_JAVA_INSTALL_NODE false whether to install Yarn/Node binaries based on the presence of a package.json or yarn.lock file
[builder] $BP_NODE_PROJECT_PATH configure a project subdirectory to look for
package.json
andyarn.lock
files[builder] Creating cache directory /home/cnb/.gradle
[builder] Compiled Application: Contributing to layer
[builder] Executing gradlew --no-daemon -Dorg.gradle.welcome=never assemble
[builder] To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.7/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
[builder] Daemon will be stopped at the end of the build
[builder] > Task :compileJava NO-SOURCE
[builder] > Task :processResources NO-SOURCE
[builder] > Task :classes UP-TO-DATE
[builder] > Task :jar
[builder] > Task :assemble
[builder]
===> EXPORTING
[exporter] Reusing layer 'paketo-buildpacks/ca-certificates:helper'
[exporter] Reusing layer 'paketo-buildpacks/bellsoft-liberica:helper'
[exporter] Reusing layer 'paketo-buildpacks/bellsoft-liberica:java-security-properties'
[exporter] Reusing layer 'paketo-buildpacks/bellsoft-liberica:jre'
[exporter] Reusing layer 'buildpacksio/lifecycle:launch.sbom'
[exporter] Reusing 1/1 app layer(s)
[exporter] Reusing layer 'buildpacksio/lifecycle:launcher'
[exporter] Reusing layer 'buildpacksio/lifecycle:config'
[exporter] Adding label 'io.buildpacks.lifecycle.metadata'
[exporter] Adding label 'io.buildpacks.build.metadata'
[exporter] Adding label 'io.buildpacks.project.metadata'
[exporter] no default process type
[exporter] Saving imagenew22...
[exporter] *** Images (e95f14c5c820):
[exporter] imagenew22
When I am trying to execute the image its not getting started because of no process type so I added a procfile with /bin/bash to check whats inside the image but there is nothing under workspace
@dmikusa , any suggestions on this
Beta Was this translation helpful? Give feedback.
All reactions