-
Notifications
You must be signed in to change notification settings - Fork 285
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
Understand Spring Boot Git Properties #446
Comments
Is there a reason this should live in pack (the platform) vs a buildpack? Aren’t we sort of coupling here? I’d worried that supporting this specific case (spring) in the platform would lead to others. Maybe technically this intelligence has to live on the platform because it handles the input to the buildpacks? |
Correct @zmackie. This is properly located in each platform because only the platform can reliably examine source information before sanitizing it for build. An example of this is that each platform will need to implement support for VCSs such as Git, Mercurial, Subversion, CVS, P4, etc. because we plan to filter out things like the |
@zmackie is there an epic for adding source metadata to labels? |
Blocked by buildpacks/lifecycle#230 |
@anthonydahanne any thoughts on this one? |
Just discussed it with @pivotal-david-osullivan , yes it would be nice to have, it's on our radar |
In a recent change to the CNB specification, support for adding source metadata to the created image's label was added. This spec change was designed for the case where the input to
pack
is a repository of source code and the buildpacks create images from that source. In this case, extraction of the source information bypack
is pretty straight forward. However, there is a use-case where the input topack
is a recompiled artifact (say a Spring Boot JAR) rather than the source repository, preventingpack
from determining the source metadata.Luckily, Spring Boot natively supports embedding Git metadata into the created JAR file.
pack
should optionally detect this metadata if it exists, and use it for the contents of the image's source metadata.Technical Details
The Spring Boot Maven and Gradle plugins both optionally embed this metadata. By default the location of this file is
BOOT-INF/classes/git.properties
. This location can be moved, but finding it at a non-default location should be out of scope of this effort.This file follows the Java Properties File format. An example of the created file, including the standard keys, follows:
Various properties should be extracted out of this content and mapped to the expected fields in the source metadata payload.
The text was updated successfully, but these errors were encountered: