Skip to content
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

Provide ability to use custom URL for JDK and JVMKill download #93

Closed
2 tasks done
jreznot opened this issue Aug 5, 2021 · 2 comments
Closed
2 tasks done

Provide ability to use custom URL for JDK and JVMKill download #93

jreznot opened this issue Aug 5, 2021 · 2 comments

Comments

@jreznot
Copy link

jreznot commented Aug 5, 2021

What happened?

  • What were you attempting to do?

I want to have network independent build of Docker images on CI of my company.
Please provide a config key to set base URL for JDK downloading.

  • What did you expect to happen?

There should be a way to specify base URL to download JDK from a server inside the company. I want to have all dependencies cached to be able to build apps even if Amazon services are offline. Maven libraries are cached inside my company using Maven server that caches every library I use in apps.

  1. Extract the attached project
  2. Run ./gradlew bootBuildImage
  • What was the actual behavior? Please provide log output, if possible.

The build pack always downloads JDK from https://corretto.aws/downloads/ and JVMKill from https://github.com/cloudfoundry/jvmkill/:

    [creator]       Corretto JDK 11.0.12: Contributing to layer
    [creator]         Downloading from https://corretto.aws/downloads/resources/11.0.12.7.1/amazon-corretto-11.0.12.7.1-linux-x64.tar.gz
    [creator]         Verifying checksum
    [creator]         Expanding to /layers/paketo-buildpacks_amazon-corretto/jdk
    [creator]       JVMKill Agent 1.16.0: Contributing to layer
    [creator]         Downloading from https://github.com/cloudfoundry/jvmkill/releases/download/v1.16.0.RELEASE/jvmkill-1.16.0-RELEASE.so
    [creator]         Verifying checksum
    [creator]         Copying to /layers/paketo-buildpacks_amazon-corretto/jvmkill

Build Configuration

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
    using? Please include a version.

Spring Boot 2.5 BootBuildImage Gradle task.

  • What buildpacks are you using? Please include versions.
tasks.withType<BootBuildImage> {
  builder = "gcr.io/paketo-buildpacks/builder:base"
  buildpacks = listOf(
    "gcr.io/paketo-buildpacks/amazon-corretto:latest",
    "gcr.io/paketo-buildpacks/executable-jar:latest",
    "gcr.io/paketo-buildpacks/spring-boot:latest",
  )
  environment = mapOf("BP_JVM_VERSION" to "11.0.12")
}
  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?
gcr.io/paketo-buildpacks/builder:base
  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?

Checklist

  • I have included log output.
  • I have included steps for reproduction.
@jreznot jreznot changed the title Provide ability to use custom URL for JDK download Provide ability to use custom URL for JDK and JVMKill download Aug 5, 2021
@jreznot
Copy link
Author

jreznot commented Aug 5, 2021

It seems that the required configuration is described in
https://paketo.io/docs/reference/configuration/#building-behind-a-firewall

@jreznot jreznot closed this as completed Aug 5, 2021
@dmikusa
Copy link
Contributor

dmikusa commented Aug 9, 2021

It seems that the required configuration is described in
https://paketo.io/docs/reference/configuration/#building-behind-a-firewall

Correct.

Please do let me know if you have any feedback on this process. We have been having some discussions about potentially making some changes. At the moment, it can be painful to remap a log of dependencies. In addition, you can only remap dependencies that exist in buildpack.toml, you cannot change versions. If you're hitting any limits with the existing support, feel free to reach out here or in a new issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants