Add default functionality & refactor packaging #957
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds an environment variable that can be used by operations teams to set default values. Operator defaults override buildpack defaults, but are overridden by application developer values. Operator defaults are set by exposing an environment variable of the pattern
JBP_DEFAULT_<config-file>='<inline-yaml>'
. So to set a default Java version,JBP_DEFAULT_OPEN_JDK_JRE='{ jre: { version: 11.+ }}'
.Adds
config/packaging.yml
. This contains the list of component data. Each component gets a name, CVE notes link and release notes link. This information is used by therake versions
command to generate a nice set of release notes for each package. This information was refactored out of the scripts (was previously hard-coded).Each
config/<jre>.yml
file has been given ajre.version_lines
property. This is a list of the supported version lines for that JRE. It defaults to using pattern matching to pick the latest 1.8, 11 and 17 versions. If you are packaging your own version of the buildpack and want to limit the version lines included, perhaps to reduce the size of the generated buildpack file, you can edit this list and remove entries. Theh package script will only include what is listed in this array.When pinning versions, the packaging script will now update each
config/<jre>yml
file'sjre.version_lines
list with the pinned versions, in addition tojre.version
. This allows you to have a list of every version line bundled with the buildpack when a release is cut (previously, only 1.8 was committed to source control). This helps when rebuilding a version of the Java buildpack at a later date, as you'll have the exact set of Java versions which should be included.You may change the default version of Java that is selected during a build of the Java buildpack by setting the
config/<jre>.yml
file'sjre.version
value. This needs to match one of the entries injre.version_lines
. Then follow the standard packaging steps the the buildpack that's generated will use the selected version of Java by default.Resolves #938 #892 #886
Signed-off-by: Daniel Mikusa dmikusa@vmware.com