java-buildpack icon indicating copy to clipboard operation
java-buildpack copied to clipboard

Add PLATFORMS var for offline bundling

Open AnnaAAL opened this issue 2 years ago • 4 comments

As discussed in https://github.com/cloudfoundry/java-buildpack/issues/986 there's a need to have PLATFORMS var to allow selecting between bionic and jammy for cflinuxfs3 and cflinuxfs4 stacks.

AnnaAAL avatar Jan 18 '23 10:01 AnnaAAL

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: AnnaAAL (0ce7b0dc09c7ac09cca5c5fe99ca7af10ad38ee8, c4e4fd2cae50a2d7bf1f5aef8f1f8bf77994a9d8)

Hi @dmikusa @pivotal-david-osullivan, would you consider this suggestion for fix to #986 ? With this proposal there's no need to compile both bionic and jammy, as the buildpack size is getting larger.

AnnaAAL avatar Jan 24 '23 09:01 AnnaAAL

Thanks for putting this together! I think it's a great solution, and after talking with @pivotal-david-osullivan we can definitely include it.

The feedback we have is that we'd like to see a different default value applied. We'd prefer, for the time being, to have the default be both bionic and jammy.

David also did some testing and found that if thePLATFORM env is just empty then the default value is not applied. Checking against platform_var.empty? would be a good idea. If it's empty, assign the default.

You might also want to trim whitespace after you split on the ,. I didn't try it, but if someone enters bionic, jammy the extra space might cause issues.

Thanks again for the PR!

dmikusa avatar Jan 24 '23 13:01 dmikusa

Hi @AnnaAAL, thanks again for the contribution! Are you able to make the adjustments suggested above to handle empty values/whitespace so we can get this merged?

pivotal-david-osullivan avatar Mar 15 '23 12:03 pivotal-david-osullivan