Skip to content

Commit 5fe41f8

Browse files
author
Daniel Mikusa
authored
Add default functionality & refactor packaging (#957)
1. 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.+ }}'`. 2. 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 the `rake 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). 3. Each `config/<jre>.yml` file has been given a `jre.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. 4. When pinning versions, the packaging script will now update each `config/<jre>yml` file's `jre.version_lines` list with the pinned versions, in addition to `jre.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. 5. 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's `jre.version` value. This needs to match one of the entries in `jre.version_lines`. Then follow the standard packaging steps the the buildpack that's generated will use the selected version of Java by default. Signed-off-by: Daniel Mikusa <[email protected]>
1 parent 8f446a7 commit 5fe41f8

21 files changed

+800
-315
lines changed

Diff for: .idea/runConfigurations/All_Tests__2_5_.xml

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/runConfigurations/All_Tests__2_7_.xml

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/runConfigurations/All_Tests__3_0_.xml

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/runConfigurations/Without_Integration_Tests__2_5_.xml

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/runConfigurations/Without_Integration_Tests__2_7_.xml

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/runConfigurations/Without_Integration_Tests__3_0_.xml

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)